Core/Movement: ported most movement updates from master branch and corrected behavior of CREATURE_STATIC_FLAG_4_PREVENT_SWIM

This commit is contained in:
Ovahlord committed 2025-03-09 20:49:41 +01:00
1 parent 83958342d9
commit 2953efb7a3
22 files changed
+306 -314

No files matched your search

+28 -23
View File
@@ -138,8 +138,8 @@ enum UnitFlags : uint32
UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // on player pets: whether the pet is chasing a target to attack || on other units: whether any of the unit's minions is in combat
UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3
UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1
UNIT_FLAG_CANNOT_SWIM = 0x00004000, // 2.0.8
UNIT_FLAG_SWIMMING = 0x00008000, // shows swim animation in water
UNIT_FLAG_CANT_SWIM = 0x00004000, // 2.0.8
UNIT_FLAG_CAN_SWIM = 0x00008000, // shows swim animation in water
UNIT_FLAG_NOT_ATTACKABLE_2 = 0x00010000,
UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok
UNIT_FLAG_STUNNED = 0x00040000, // 3.0.3 ok
@@ -162,27 +162,32 @@ enum UnitFlags : uint32
// Value masks for UNIT_FIELD_FLAGS_2
enum UnitFlags2 : uint32
{
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_UNK1 = 0x00000002, // Hide unit model (show only player equip)
UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004,
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_MIRROR_IMAGE = 0x00000010,
UNIT_FLAG2_INSTANTLY_APPEAR_MODEL = 0x00000020, // Unit model instantly appears when summoned (does not fade in)
UNIT_FLAG2_FORCE_MOVEMENT = 0x00000040,
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, // Player has disabled predicted stats (Used by raid frames)
UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
UNIT_FLAG2_RESTRICT_PARTY_INTERACTION = 0x00001000, // Restrict interaction to party or raid
UNIT_FLAG2_PREVENT_SPELL_CLICK = 0x00002000, // Prevent spellclick
UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000,
UNIT_FLAG2_DISABLE_TURN = 0x00008000,
UNIT_FLAG2_UNK2 = 0x00010000,
UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // Plays special death animation upon death
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // Allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
UNIT_FLAG2_NO_ACTIONS = 0x00800000,
UNIT_FLAG2_DISABLE_UNIT_FRAME = 0x04000000, // Disables the unit frame when selecting the target
UNIT_FLAG2_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS = 0x08000000 // Allows spells with a min range restriction to be cast when closer than given range value
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_UNK1 = 0x00000002, // Hide unit model (show only player equip)
UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004,
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_MIRROR_IMAGE = 0x00000010,
UNIT_FLAG2_INSTANTLY_APPEAR_MODEL = 0x00000020, // Unit model instantly appears when summoned (does not fade in)
UNIT_FLAG2_FORCE_MOVEMENT = 0x00000040,
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, // Player has disabled predicted stats (Used by raid frames)
UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
UNIT_FLAG2_RESTRICT_PARTY_INTERACTION = 0x00001000, // Restrict interaction to party or raid
UNIT_FLAG2_PREVENT_SPELL_CLICK = 0x00002000, // Prevent spellclick
UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000,
UNIT_FLAG2_CANNOT_TURN = 0x00008000,
UNIT_FLAG2_UNK2 = 0x00010000,
UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // Plays special death animation upon death
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // Allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
UNIT_FLAG2_SUPPRESS_HIGHLIGHT_WHEN_TARGETED_OR_MOUSED_OVER = 0x00080000, // Suppress highlight when targeted or moused over
UNIT_FLAG2_TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS = 0x00100000, // Treat as Raid Unit For Helpful Spells (Instances ONLY)
UNIT_FLAG2_LARGE_AOI = 0x00200000, // Large (AOI)
UNIT_FLAG2_GIGANTIC_AOI = 0x00400000, // Gigantic (AOI)
UNIT_FLAG2_NO_ACTIONS = 0x00800000,
UNIT_FLAG2_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS = 0x01000000, // AI will only swim if target swims
UNIT_FLAG2_DISABLE_UNIT_FRAME = 0x04000000, // Disables the unit frame when selecting the target
UNIT_FLAG2_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS = 0x08000000 // Allows spells with a min range restriction to be cast when closer than given range value
};
/// Non Player Character flags