Trinitycore: [3.3.5] Core/Spell: State emotes from Auras

Created on 18 Nov 2015  路  39Comments  路  Source: TrinityCore/TrinityCore

Some auras changes the emote state for the npc, example: spell= 50544

Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA)
BasePoints = 1
Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET)
Aura Id 12 (SPELL_AURA_MOD_STUN), value = 1, misc = 0 (0), miscB = 0, periodic = 0

If I'm not wrong the SPELL_AURA_MOD_STUN changes the emote state.
The problem is the emote sate is wrong in this case it must be drowned an not dead, here a picture to explain the issue:
On 3.3.5 the emote is wrong on 4.3.4 and 6.x it's correct.

rev. 302623a1516e
img

Also this spell has the same issue: 64462 [Drowned State]

The best way to test the issue is to .aura 64462 or 50544 to see the result.

Branch-3.3.5a Comp-Core Feedback-FixHack Sub-Spells

Most helpful comment

ServerToClient: SMSG_COMPRESSED_UPDATE_OBJECT (0x1CC3) Length: 1969 ConnIdx: 0 Time: 11/29/2011 07:41:55.000 Number: 91259
[8] UpdateType: CreateObject1
[8] GUID: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] Object Type: 3 (Unit)
[8] Update Flags: 16480 (Living, StationaryObject, Unknown)
[8] Movement Flags: 512 (OnTransport)
[8] Extra Movement Flags: 0 (None)
[8] OnTransport: False
[8] Swimming: False
[8] InterPolatedTurning: False
[8] SplineElevation: False
[8] HasSplineData: False
[8] GUID 2: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] Time: 3993958783
[8] Position: X: 7469.613 Y: 4739.7407 Z: -8.547201
[8] Orientation: 0.174532920122146606
[8] Walk Speed: 2.5
[8] Run Speed: 8
[8] RunBack Speed: 4.5
[8] Swim Speed: 4.72221994400024414
[8] SwimBack Speed: 2.5
[8] Turn Speed: 7
[8] Fly Speed: 4.5
[8] FlyBack Speed: 3.141592741012573242
[8] Pitch Speed: 3.141592741012573242
[8] OBJECT_FIELD_GUID: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] OBJECT_FIELD_TYPE: 9
[8] OBJECT_FIELD_ENTRY: 29649
[8] OBJECT_FIELD_SCALE_X: 1
[8] UNIT_FIELD_BYTES_0: 0/1/0/1
[8] UNIT_FIELD_HEALTH: 11770
[8] UNIT_FIELD_MAXHEALTH: 11770/1.6493E-41
[8] UNIT_FIELD_LEVEL: 78/1.1E-43
[8] UNIT_FIELD_FACTIONTEMPLATE: 35/4.9E-44 (35)
[8] UNIT_FIELD_FLAGS: 33554944
[8] UNIT_FIELD_FLAGS_2: 2048
[8] UNIT_FIELD_BASEATTACKTIME: 2000/2.803E-42
[8] UNIT_FIELD_BASEATTACKTIME + 1: 2000/2.803E-42
[8] UNIT_FIELD_BOUNDINGRADIUS: 0.347
[8] UNIT_FIELD_COMBATREACH: 1.5
[8] UNIT_FIELD_DISPLAYID: 26407/3.7004E-41
[8] UNIT_FIELD_NATIVEDISPLAYID: 26407/3.7004E-41
[8] UNIT_MOD_CAST_SPEED: 1065353216/1
[8] UNIT_MOD_CAST_HASTE: 1065353216/1
[8] UNIT_NPC_EMOTESTATE: 383/5.37E-43
[8] UNIT_FIELD_BYTES_2: 1/0/0/0
[8] UNIT_FIELD_HOVERHEIGHT: 1

EMOTE_STATE_DROWNED and they spawns in the air, no auras. If you disable their gravity, they will appear with dead stand state. If you root them they will appear correctly drowned.

All 39 comments

Have both NPCs (335 npc and 434 npc) the same unit_flags, unit_flags2, flags_extra ecc? Do they have some differences in creature_template_addon or creature_template? If they are completly the same in both databases maybe this could be a core bug. @Killyana can you check?

Maybe emote state should be different if creature is flying (state drowned).

The 3.3.5 emotestate of that NPC looks like a combination of a "knocked out/lying dead" state with or without the "arms in the air" emote that NPCs display when they start walking on bad waypoints distanced from the map surface. Not sure if this helps, it is mostly my observation of how it looks.

Ofc npcs are the same in all branches, you can also test the spells on your characters in 3.3.5 and 6.x to see the difference.

Auras do not change emote states unless scripted specifically to do that.

So maybe it's related to something else, anyway many other spells are affected, like 54440, 36550, 36545, instead of drowning the visual is death.

@Killyana additional note for what I said: auras do not change emote states _SERVERSIDE_ unless scripted - client can do it by itself with spell visuals (zero server interaction)

auras do not change emote states SERVERSIDE unless scripted - client can do it by itself with spell visuals (zero server interaction)

Are these spells scripted? Or else is it possible that there are some visual spells missed in 4.3.4. and 6.x?

No script related to this spell, also the issue is on 3.3.5 only, on 434 and 6x the visual is correct.

What are the unit_flags, unit_flags2 of that npc?

Heh, tried finding him in the DB by name "Total Tirocanon", but forgot that Killyana uses a French client:
=> http://fr.wowhead.com/npc=27987/total-tirocanon
http://www.wowhead.com/npc=27987/monte-muzzleshot

SELECT `entry`,`modelid1`,`name`,`minlevel`,`maxlevel`,`exp`,`unit_flags`,`unit_flags2`,`AIName`,`InhabitType`,`VerifiedBuild` 
FROM `creature_template` WHERE `entry`= 27987;
 entry  modelid1  name              minlevel  maxlevel     exp  unit_flags  unit_flags2  AIName   InhabitType  VerifiedBuild
------  --------  ----------------  --------  --------  ------  ----------  -----------  -------  -----------  -------------
 27987     24972  Monte Muzzleshot        76        76       2      295168         2048  SmartAI            4          12340

unit_flags = 295168 = UNIT_FLAG_STUNNED + UNIT_FLAG_UNK_15 + UNIT_FLAG_IMMUNE_TO_PC
unit_flags2 = 2048 = UNIT_FLAG2_REGENERATE_POWER


Edit: wish I could put some more documentation in the wiki table for unit_flags on the _UNK_ flags, but I guess there is not enough information to find on what the flags actually do.

Can you check if it helps to add UNIT_FLAG_UNK_29 or UNIT_FLAG2_FEIGN_DEATH.
I took a look at http://www.wowhead.com/npc=26873. He has these flags which are set by http://www.wowhead.com/spell=29266 and appears drowning.

TrinityCore rev. 38c44fad8d7e 2015-11-22 18:30:42 +0100 (3.3.5 branch) (Win64, Release)
TDB 335.60 + updates up to and including 2015_11_22_02_world.sql

UPDATE `creature_template` SET `modelid1`= 24094,`unit_flags`= 537165824,`unit_flags2`= 2049,
`AIName`= '', `InhabitType`= 3 WHERE `entry` = 27987;
SELECT `entry`,`modelid1`,`name`,`minlevel`,`maxlevel`,`exp`,`unit_flags`,`unit_flags2`,
`AIName`,`InhabitType`,`VerifiedBuild` FROM `creature_template` WHERE `entry` IN (26873,27987);
 entry  modelid1  name                     minlevel  maxlevel     exp  unit_flags  unit_flags2  AIName  InhabitType  VerifiedBuild
------  --------  -----------------------  --------  --------  ------  ----------  -----------  ------  -----------  -------------
 26873     24094  Mage-Commander Evenstar        73        73       2   537165824         2048                    3          12340
 27987     24094  Monte Muzzleshot               76        76       2   537165824         2049                    3          12340

Unfortunately no luck testing any combination of unit_flags, unit_flags2 and also testing InhabitType = 3 instead of 4, changing modelid1 to the same as Mage-Commander Evenstar (NPC 26873, modelid1 24094) and even removing SmartAI as AI for this NPC. The only change I achieved was to see the NPC facing down and pointing in random directions instead of the NPC's inteded direction.
I suppose we can rule out the SmartAI script as source of this issue, as well as the flags.


BTW: when testing and looking at the NPC in-game, watch out for the rare Elite Aotona (big bird) ;)


Tested this again by spawning another copy of NPC 27987 (Monte Muzzleshot) on the ground, he is semi-hovering (as if he was suspended in water), so that pose looks OK. Then cast: .aura 50544 on the copy (http://www.wowhead.com/spell=50544/cosmetic-parachute-stuck) ... and he lies flat out on his back. The exact same happens with .aura 64462 (Drowned State), so the auras are really the issue here.

Can you try and find out which of the unit_flags mentioned above is needed for the correct behavior. Please don't use the aura for this and check every combination of UNIT_FLAG_STUNNED, UNIT_FLAG_UNK29, UNIT_FLAG2_FEIGN_DEATH on a clean TC DB entry of Monte Muzzleshot spawned on the ground.

To me it sounds like the aura stun effect removes the disable gravity movement flag. Maybe you can also debug moveflags for the permanent and the additional spawn.

Forget about the npcs and test the auras: 54440, 36550, 36545 on your character, on 3.3.5 and 6.x to see the difference.

OK, will test all of the above when I get home to see what they do (both scenarios interest me).
http://www.wowhead.com/spell=36545/floating-drowned
http://www.wowhead.com/spell=36550/floating-drowned
http://www.wowhead.com/spell=54440/floating-drowned
http://www.wowhead.com/spell=50544/cosmetic-parachute-stuck
http://www.wowhead.com/spell=64462/drowned-state
http://www.wowhead.com/spell=77564/drowned-state
http://www.wowhead.com/spell=117509/drowned-state
(also checking what the NPC will look like with the unit flags changed)

I got some time to set up a running core and took a look at the movement flags. On TC Monte Muzzleshot has moveflags 3328 (Walking, DisableGravity, Root) when under the effect of that aura.
Unfortunately I don't have any 335 sniffs of him.

I checked http://www.wowhead.com/npc=26873 and the surrounding human npcs. On TC they have just 2097152 (Swimming).
I tried to apply aura 50544 and 29266 to them and found out that they got into a drowned state.
So the auras work as intended.

This is related to the movement flags as I said above. But it needs further investigation which flags are supported. I don't have the time to do that, sadly. Just wanted to let you know to point you in the right direction.

At least I can say that http://www.wowhead.com/npc=26873 has the wrong moveflags on TC because in 335 sniffs he has (DisableGravity, Root). But you better check TC movementflags for yourself. My core is not up to date.

OK, thanks a lot for taking the time to check those details. I missed out on those in my previous testing.
Good points about the movement flags, I did not know that those would interfere as much as you say.
I hope TC have got some values on Monte Muzzleshot in any archived sniffs (I don't know).
Will keep you posted when I get some progress in my testing on current core and DB.

Question regarding movement flags: how to find (or set) MOVEMENTFLAG_DISABLE_GRAVITY on the NPCs we are looking at? I can not find a direct correlation between MOVEMENTFLAG_ and the creature_template flags MovementType or movementId, from what I can read in the TC wiki.

From https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Unit/Unit.h#L682:

================================================
 MOVEMENTFLAG_NONE                  = 0x00000000
 MOVEMENTFLAG_FORWARD               = 0x00000001
 MOVEMENTFLAG_BACKWARD              = 0x00000002
 MOVEMENTFLAG_STRAFE_LEFT           = 0x00000004
 MOVEMENTFLAG_STRAFE_RIGHT          = 0x00000008
 MOVEMENTFLAG_LEFT                  = 0x00000010
 MOVEMENTFLAG_RIGHT                 = 0x00000020
 MOVEMENTFLAG_PITCH_UP              = 0x00000040
 MOVEMENTFLAG_PITCH_DOWN            = 0x00000080
 MOVEMENTFLAG_WALKING               = 0x00000100  // Walking
 MOVEMENTFLAG_ONTRANSPORT           = 0x00000200  // Used for flying on some creatures
 MOVEMENTFLAG_DISABLE_GRAVITY       = 0x00000400  // Former MOVEMENTFLAG_LEVITATING. This is used when walking is not possible.
 MOVEMENTFLAG_ROOT                  = 0x00000800  // Must not be set along with MOVEMENTFLAG_MASK_MOVING
 MOVEMENTFLAG_FALLING               = 0x00001000  // damage dealt on that type of falling
 MOVEMENTFLAG_FALLING_FAR           = 0x00002000
 MOVEMENTFLAG_PENDING_STOP          = 0x00004000
 MOVEMENTFLAG_PENDING_STRAFE_STOP   = 0x00008000
 MOVEMENTFLAG_PENDING_FORWARD       = 0x00010000
 MOVEMENTFLAG_PENDING_BACKWARD      = 0x00020000
 MOVEMENTFLAG_PENDING_STRAFE_LEFT   = 0x00040000
 MOVEMENTFLAG_PENDING_STRAFE_RIGHT  = 0x00080000
 MOVEMENTFLAG_PENDING_ROOT          = 0x00100000
 MOVEMENTFLAG_SWIMMING              = 0x00200000  // appears with fly flag also
 MOVEMENTFLAG_ASCENDING             = 0x00400000  // press "space" when flying
 MOVEMENTFLAG_DESCENDING            = 0x00800000
 MOVEMENTFLAG_CAN_FLY               = 0x01000000  // Appears when unit can fly AND also walk
 MOVEMENTFLAG_FLYING                = 0x02000000  // unit is actually flying. pretty sure this is only used for players. creatures use disable_gravity
 MOVEMENTFLAG_SPLINE_ELEVATION      = 0x04000000  // used for flight paths
 MOVEMENTFLAG_SPLINE_ENABLED        = 0x08000000  // used for flight paths
 MOVEMENTFLAG_WATERWALKING          = 0x10000000  // prevent unit from falling through water
 MOVEMENTFLAG_FALLING_SLOW          = 0x20000000  // active rogue safe fall spell (passive)
 MOVEMENTFLAG_HOVER                 = 0x40000000  // hover, cannot jump

Do I need to create a .cpp script for the NPC to manipulate MOVEMENTFLAG_DISABLE_GRAVITY or can it be done in SAI? The current "movement" values in DB for Monte Muzzleshot and Mage-Commander Evenstar are as follows:

SELECT `entry`,`modelid1`,`name`,`minlevel`,`maxlevel`,`exp`,`faction`,`npcflag`,`unit_flags`,`unit_flags2`,`dynamicflags`,`type_flags`,`AIName`,`MovementType`,`InhabitType`,`movementId`,`VerifiedBuild` 
FROM `creature_template` WHERE `entry` IN (26873,27987);
 entry  modelid1  name                     minlevel  maxlevel     exp  faction  npcflag  unit_flags  unit_flags2  dynamicflags  type_flags  AIName   MovementType  InhabitType  movementId  VerifiedBuild
------  --------  -----------------------  --------  --------  ------  -------  -------  ----------  -----------  ------------  ----------  -------  ------------  -----------  ----------  -------------
 26873     24094  Mage-Commander Evenstar        73        73       2       35        2   537165824         2048            32         128                      0            3           0          12340
 27987     24972  Monte Muzzleshot               76        76       2       35        2      295168         2048             0           0  SmartAI             0            4           0          12340

I tested various combinations of the flags UNIT_FLAG_STUNNED, UNIT_FLAG_UNK29, UNIT_FLAG2_FEIGN_DEATH on my spawned NPC, but they did not seem to make any difference.

BTW, my current core rev. hash is 4298ade165aa 2015-11-23 20:17:04 +0100 (3.3.5 branch).


Edit: regarding SAI, Monte Muzzleshot (NPC 27987) seems to have these entries in smart_scripts:

SELECT * FROM `smart_scripts` WHERE `entryorguid` LIKE '%27987%';
entryorguid  source_type      id    link  event_type  event_phase_mask  event_chance  event_flags  event_param1  event_param2  event_param3  event_param4  action_type  action_param1  action_param2  action_param3  action_param4  action_param5  action_param6  target_type  target_param1  target_param2  target_param3  target_x  target_y  target_z  target_o  comment                       
-----------  -----------  ------  ------  ----------  ----------------  ------------  -----------  ------------  ------------  ------------  ------------  -----------  -------------  -------------  -------------  -------------  -------------  -------------  -----------  -------------  -------------  -------------  --------  --------  --------  --------  ------------------------------
    2798700            9       0       0           0                 0           100            0         10000         10000             0             0            1              0              0              0              0              0              0           21             40              0              0         0         0         0         0  27987 - Action List - talk    
      27987            0       0       0          25                 0           100            0             0             0             0             0           60              1              0              0              0              0              0            1              0              0              0         0         0         0         0   27987 - On spawn - set fly on

Edit 2: I also tested setting identical flags from NPC 26873 (Mage-Commander Evenstar) on to Monte Muzzleshot in creature_template, but they did not make any difference either.

I don't think it is possible to manipulate the movementflags by any type of script in a legal way.
They are set by the core depending on movement type of the creature, auras that affect the creature (stuns, etc.), inhabittype and where the creature is (ground, air, water).

Such auras also often change the unit_flags. But it is not enough to manipulate just the unit_flags. It seems the right combination of movementflags and unit_flags is needed for the client to display the correct state.

As of now I believe it needs for example MOVEMENTFLAG_SWIMMING and UNIT_FLAG_STUNNED for the drowned state of a creature. You can check this on any swimming human npc.
But MOVEMENTFLAG_SWIMMING is surely not the correct one for a flying npc, I suppose. So we need to find out which flag works for flying npcs, maybe MOVEMENTFLAG_CAN_FLY. Best thing would be a 335 sniff of Monte Muzzleshot (Summoning @Aokromes ). So we can compare the movementflags from 335 to TC's ones.
If there are any differences we need to investigate the reason and fix this.

Else you should find another npc with different movementflags that shows the correct behavior when unter the effect of the auras. I would suggest some flying creatures without random movement.

This comment from ariel- (https://github.com/TrinityCore/TrinityCore/pull/15884#issuecomment-158780854) made me think that perhaps the issue could have something to do with the function void Creature::UpdateMovementFlags() in Creature.cpp, but I have tried to use the changes below, without any success yet. The job of porting SetFall() from 6.x to 3.3.5 takes more work than I first thought, so any helpful pointers on how to test my theory would be nice.

diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index ea10ce7..d9460cc 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -42,6 +42,7 @@
 #include "SpellAuraEffects.h"
 #include "SpellMgr.h"
 #include "TemporarySummon.h"
+#include "Unit.h"
 #include "Util.h"
 #include "Vehicle.h"
 #include "World.h"
@@ -2606,7 +2607,7 @@ void Creature::UpdateMovementFlags()
     }

     if (!isInAir)
-        RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING);
+        SetFall(false);

     SetSwim(GetCreatureTemplate()->InhabitType & INHABIT_WATER && IsInWater());
 }
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 2500f32..dec887b 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1569,6 +1569,7 @@ class Unit : public WorldObject
         bool IsHovering() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_HOVER); }
         virtual bool SetWalk(bool enable);
         virtual bool SetDisableGravity(bool disable, bool packetOnly = false);
+        bool SetFall(bool enable);
         virtual bool SetSwim(bool enable);
         virtual bool SetCanFly(bool enable, bool packetOnly = false);
         virtual bool SetWaterWalking(bool enable, bool packetOnly = false);

By the way, this code fails because of a linker error. I tried adding Unit.h to the include list in Creature.cpp, but that did not make any progress either. I also tried to add more of the occurrences of SetFall() to the other files where it is used in 6.x, but still no luck. Suggestions, anyone?

I found an old 422 sniff of Monte Muzzelshot. It shows movementflags = 0x00180000.
According to the WPP movementflags enum for 434 this means MOVEMENTFLAG_ROOT and MOVEMENTFLAG_SWIMMING.
So my research regarding the spells was correct. They only work if the npcs are swimming.

Now all we need to do is get Monte Muzzleshot to start swimming. I don't know if this can be done using SAI or something similar.

Thanks for the update and sniff research, good job. :+1: I will look into how it can be tested and changed.

There is an action_type named SET_SWIM (61) right after SET_FLY (60) in the action list.

UPDATE `smart_scripts` SET `action_type`= 61 WHERE `entryorguid`= 27987;

Going to test this now. Update: it is not enough. Need to experiment more with full SAI and more lines.

Guys, for the last time forget about NPCs and test spells (like 50544) on your characters to see the difference between 3.3.5 and 6.x. It's not related to movementflags.

TrinityCore rev. e266278f7d02 2015-11-27 22:10:21 +0100 (3.3.5 branch) (Win64, Release) / TDB 335.60
In 3.3.5, spell/aura 50544 always lays players and NPCs flat on the ground (if not swimming/drowned).

@Killyana I don't think so.

The spell obviously works as intended on the 3.3.5 branch when the target has the correct movementflags compared to retail sniffs. So there is nothing wrong about the spellhandling here.

If the spell works on 6.x branch without those movementflags then probably clienthandling changed meanwhile. This means the client will display any unit that has MOVEMENTFLAG_DISABLE_GRAVITY and MOVEMENTFLAG_ROOT in a drowned state.

The visual appearance has absolutely nothing to do with serverside handling. The only thing we need to change on serverside (maybe DB) is the movementflags of Monte Muzzleshot.
Perhaps a generic solution would be to handle units that have MOVEMENTFLAG_DISABLE_GRAVITY and get MOVEMENTFLAG_ROOT from a stun effect of an aura to change MOVEMENTFLAG_DISABLE_GRAVITY to MOVEMENTFLAG_SWIMMING.
I can't say anything about that. It would be best if @Shauren could make a statement.

@Pitcrawler : I went back to the area around Mage-Commander Evenstar to test your theory about drowned and swimming NPCs a bit closer. This time, I put a parachute ( .aura 50544 ) on each and every one of the humanoids. At first, it just looked like I had planted lots of mushrooms and the dead NPCs seemed to have only tiny reactions to the aura, if any. The moving ones got stunned and hunched, of course.

Then I looked in the DB for more NPCs with similar flags to Evenstar and I found Iruk out in the sea. But when I came back to the mages to check on my testing I found that there was at least a 50% "drop" rate from hunching down to the flat out stiff and dead position. So I removed the aura from those who had gone flat out and went back to Iruk, but he seemed to have a less chance of dropping, more like 1 in 5 chance from the visits that I paid him, but he did drop flat once. "The jury is still out", it seems.

Same issue with: http://www.wowhead.com/spell=6606/self-visual-sleep-until-cancelled-dnd on http://www.wowhead.com/npc=3892/relara-whitemoon the spell must change the emote state to sleep not to sit.

well usually lying down, sitting, etc is set via bytes 1 and not aura there still maybe some aura involved to give sleep effects though.

There's already Bytes1=3 on creature_addon but the aura override this values.

hackfix:

         case 50544: // Cosmetic - Parachute Stuck
                spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_DUMMY;
                break;
-- Monte Muzzleshot SAI
SET @ENTRY := 27987;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,1,3000,3000,0,0,75,50544,0,0,0,0,0,1,0,0,0,0,0,0,0,"Monte Muzzleshot - Out of Combat - Add Aura 'Cosmetic - Parachute Stuck' (No Repeat)");

DELETE FROM `creature_addon` WHERE `guid` = 114140;
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
(114140, 0, 0, 0, 1, 0, ''); -- 28097 - 51344 - 51344

Here's a full 3.3.5 CreateObject packet for our friend Monte:

[7] UpdateType: CreateObject1
[7] GUID: Full: 0x0 Type: Creature Entry: 27987 (Monte Muzzleshot) Low: 0
[7] Object Type: 3 (Unit)
[7] Update Flags: 96 (Living, StationaryObject)
[7] Movement Flags: 3072 (DisableGravity, Root)
[7] Extra Movement Flags: 0 (None)
[7] Time: -483906269
[7] Position: X: 5584.025 Y: 5200.421 Z: -129.2975
[7] Orientation: 0.5934119
[7] Fall Time: 0
[7] Walk Speed: 2.5
[7] Run Speed: 8
[7] RunBack Speed: 4.5
[7] Swim Speed: 4.722222
[7] SwimBack Speed: 2.5
[7] Turn Speed: 7
[7] Fly Speed: 4.5
[7] FlyBack Speed: 3.141593
[7] Pitch Speed: 3.141593
[7] OBJECT_FIELD_GUID: 0/0
[7] 1: 4046454893/-8.71518E+29
[7] OBJECT_FIELD_TYPE: 9/1.261169E-44
[7] OBJECT_FIELD_ENTRY: 27987/3.921814E-41
[7] OBJECT_FIELD_SCALE_X: 1065353216/1
[7] UNIT_FIELD_BYTES_0: 16777472/2.35106E-38
[7] UNIT_FIELD_HEALTH: 11001/1.541568E-41
[7] UNIT_FIELD_POWER3: 100/1.401298E-43
[7] UNIT_FIELD_POWER4: 100/1.401298E-43
[7] UNIT_FIELD_POWER5: 1000000/1.401298E-39
[7] UNIT_FIELD_MAXHEALTH: 11001/1.541568E-41
[7] UNIT_FIELD_MAXPOWER3: 100/1.401298E-43
[7] UNIT_FIELD_MAXPOWER4: 100/1.401298E-43
[7] UNIT_FIELD_MAXPOWER5: 1000000/1.401298E-39
[7] UNIT_FIELD_LEVEL: 76/1.064987E-43
[7] UNIT_FIELD_FACTIONTEMPLATE: 35/4.904545E-44
[7] UNIT_VIRTUAL_ITEM_SLOT_ID + 2: 15460/2.166407E-41
[7] UNIT_FIELD_FLAGS: 295168/4.136185E-40
[7] UNIT_FIELD_FLAGS_2: 2048/2.869859E-42
[7] UNIT_FIELD_BASEATTACKTIME: 2000/2.802597E-42
[7] UNIT_FIELD_UNK63: 2000/2.802597E-42
[7] UNIT_FIELD_BOUNDINGRADIUS: 1051830780/0.347
[7] UNIT_FIELD_COMBATREACH: 1069547520/1.5
[7] UNIT_FIELD_DISPLAYID: 24972/3.499323E-41
[7] UNIT_FIELD_NATIVEDISPLAYID: 24972/3.499323E-41
[7] UNIT_MOD_CAST_SPEED: 1065353216/1
[7] UNIT_NPC_FLAGS: 2/2.802597E-45
[7] UNIT_FIELD_BYTES_2: 1/1.401298E-45
[7] UNIT_FIELD_HOVERHEIGHT: 1065353216/1

The unit_flag UNIT_FLAG_UNK_15 Only Swim must be apply its affect in water and in air, for the moment it works only in water : https://imgur.com/a/8fityQO

An other case: .cast 66412 it will summon a npc that will rise in the air, it must have the emote State Drowned, if you cast the spell under water the emote State will work correctly, but at the ground the emote state will not be displayed.

https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Unit/Unit.cpp#L12730
``sql -- missing flag UPDATEcreature_templateSET unit_flags=unit_flags|32768 WHEREentry` IN(34888);

@xvwyh any idea why the effect of UNIT_FLAG_UNK_15 is not applied in the air?

Sorry, no idea. The only thing about UNIT_FLAG_UNK_15 I know is that it allows creatures to float in the water, play swimming animations, pitch up and down when swimming. Without it, even if the creature has MOVEMENTFLAG_SWIMMING, it won't do any of these things. But I doubt it will have any effect on a creature that's not in the water but in the air.

Tried a few more times for good measure, still can't get him to work. He needs to physically be in water on the client to play the drowned animation. If I put him over water, enable gravity and let him fall into the water and THEN I apply the aura - he teleports back into the air (because of root that comes along with aura's stun) and plays the drowned animation. But if you leave his visibility range and come back - he's bad to playing regular dead animation, because aura update was sent before he had the time to fall into water.

ServerToClient: SMSG_COMPRESSED_UPDATE_OBJECT (0x1CC3) Length: 1969 ConnIdx: 0 Time: 11/29/2011 07:41:55.000 Number: 91259
[8] UpdateType: CreateObject1
[8] GUID: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] Object Type: 3 (Unit)
[8] Update Flags: 16480 (Living, StationaryObject, Unknown)
[8] Movement Flags: 512 (OnTransport)
[8] Extra Movement Flags: 0 (None)
[8] OnTransport: False
[8] Swimming: False
[8] InterPolatedTurning: False
[8] SplineElevation: False
[8] HasSplineData: False
[8] GUID 2: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] Time: 3993958783
[8] Position: X: 7469.613 Y: 4739.7407 Z: -8.547201
[8] Orientation: 0.174532920122146606
[8] Walk Speed: 2.5
[8] Run Speed: 8
[8] RunBack Speed: 4.5
[8] Swim Speed: 4.72221994400024414
[8] SwimBack Speed: 2.5
[8] Turn Speed: 7
[8] Fly Speed: 4.5
[8] FlyBack Speed: 3.141592741012573242
[8] Pitch Speed: 3.141592741012573242
[8] OBJECT_FIELD_GUID: Full: 0xF13073D100007C9A Type: Creature Entry: 29649 Low: 31898
[8] OBJECT_FIELD_TYPE: 9
[8] OBJECT_FIELD_ENTRY: 29649
[8] OBJECT_FIELD_SCALE_X: 1
[8] UNIT_FIELD_BYTES_0: 0/1/0/1
[8] UNIT_FIELD_HEALTH: 11770
[8] UNIT_FIELD_MAXHEALTH: 11770/1.6493E-41
[8] UNIT_FIELD_LEVEL: 78/1.1E-43
[8] UNIT_FIELD_FACTIONTEMPLATE: 35/4.9E-44 (35)
[8] UNIT_FIELD_FLAGS: 33554944
[8] UNIT_FIELD_FLAGS_2: 2048
[8] UNIT_FIELD_BASEATTACKTIME: 2000/2.803E-42
[8] UNIT_FIELD_BASEATTACKTIME + 1: 2000/2.803E-42
[8] UNIT_FIELD_BOUNDINGRADIUS: 0.347
[8] UNIT_FIELD_COMBATREACH: 1.5
[8] UNIT_FIELD_DISPLAYID: 26407/3.7004E-41
[8] UNIT_FIELD_NATIVEDISPLAYID: 26407/3.7004E-41
[8] UNIT_MOD_CAST_SPEED: 1065353216/1
[8] UNIT_MOD_CAST_HASTE: 1065353216/1
[8] UNIT_NPC_EMOTESTATE: 383/5.37E-43
[8] UNIT_FIELD_BYTES_2: 1/0/0/0
[8] UNIT_FIELD_HOVERHEIGHT: 1

EMOTE_STATE_DROWNED and they spawns in the air, no auras. If you disable their gravity, they will appear with dead stand state. If you root them they will appear correctly drowned.

.go c 124152

drowned state comes from aura https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?spell=58806
no creature_template_movement
no drowned state in game

[13] UpdateType: CreateObject1
[13] GUID: Full: 0xF13079C900007C01 Type: Creature Entry: 31177 Low: 31745
[13] Object Type: 3 (Unit)
[13] Update Flags: 16480 (Living, StationaryObject, Unknown)
[13] Movement Flags: 1536 (OnTransport, DisableGravity)
[13] Extra Movement Flags: 0 (None)
[13] OnTransport: False
[13] Swimming: False
[13] InterPolatedTurning: False
[13] SplineElevation: False
[13] HasSplineData: False
[13] GUID 2: Full: 0xF13079C900007C01 Type: Creature Entry: 31177 Low: 31745
[13] Time: 4019348779
[13] Position: X: 6822.057 Y: 1226.4447 Z: 279.68784
[13] Orientation: 0.261799395084381103
[13] Walk Speed: 2.5
[13] Run Speed: 8
[13] RunBack Speed: 4.5
[13] Swim Speed: 4.72221994400024414
[13] SwimBack Speed: 2.5
[13] Turn Speed: 7
[13] Fly Speed: 4.5
[13] FlyBack Speed: 3.141592741012573242
[13] Pitch Speed: 3.141592741012573242
[13] OBJECT_FIELD_GUID: Full: 0xF13079C900007C01 Type: Creature Entry: 31177 Low: 31745
[13] OBJECT_FIELD_TYPE: 9
[13] OBJECT_FIELD_ENTRY: 31177
[13] OBJECT_FIELD_SCALE_X: 1
[13] UNIT_FIELD_BYTES_0: 0/1/0/1
[13] UNIT_FIELD_HEALTH: 12600
[13] UNIT_FIELD_MAXHEALTH: 12600/1.7656E-41
[13] UNIT_FIELD_LEVEL: 80/1.12E-43
[13] UNIT_FIELD_FACTIONTEMPLATE: 35/4.9E-44 (35)
[13] UNIT_FIELD_FLAGS: 570458368
[13] UNIT_FIELD_FLAGS_2: 2048
[13] UNIT_FIELD_BASEATTACKTIME: 2000/2.803E-42
[13] UNIT_FIELD_BASEATTACKTIME + 1: 2000/2.803E-42
[13] UNIT_FIELD_BOUNDINGRADIUS: 0.306
[13] UNIT_FIELD_COMBATREACH: 1.5
[13] UNIT_FIELD_DISPLAYID: 28351/3.9728E-41
[13] UNIT_FIELD_NATIVEDISPLAYID: 28351/3.9728E-41
[13] UNIT_FIELD_BYTES_1: 0/0/0/3
[13] UNIT_MOD_CAST_SPEED: 1065353216/1
[13] UNIT_MOD_CAST_HASTE: 1065353216/1
[13] UNIT_FIELD_BYTES_2: 1/0/0/0
[13] UNIT_FIELD_HOVERHEIGHT: 1

ServerToClient: SMSG_AURA_UPDATE_ALL (0x18EE) Length: 16 ConnIdx: 0 Time: 11/29/2011 14:45:05.000 Number: 404208
GUID: Full: 0xF13079C900007C01 Type: Creature Entry: 31177 Low: 31745
[0] Slot: 0
[0] Spell ID: 58806 (58806)
[0] Flags: 27 (EffectIndex0, EffectIndex1, NotCaster, Positive)
[0] Level: 80
[0] Charges: 0

or .cast 58806 on self or .cast back 58806 on any creature

Well, if you're on c91c3cb09f6288ba66949a544b81d64099ead3e1 and
.go c (any of 43741,43769,43770,43772,44018,111738,111733,111744,111736,111737,111732,111731,113955,113954,113944,113943,113945,113953)
and wander in water, you will shortly find creature which is laying dead and not drowned
target it and .die
target corpse and .resp
it will be drowned after respawn

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chilito picture chilito  路  3Comments

Blasphemous picture Blasphemous  路  3Comments

DDuarte picture DDuarte  路  3Comments

Jildor picture Jildor  路  3Comments

tje3d picture tje3d  路  3Comments