mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Core/Movement): set proper flying animations for creatures with INHABIT_GROUND (#7589)
- Closes #7579
This commit is contained in:
@@ -3108,7 +3108,10 @@ void Creature::UpdateMovementFlags()
|
||||
if (isInAir && !IsFalling())
|
||||
{
|
||||
if (info->InhabitType & INHABIT_GROUND)
|
||||
{
|
||||
SetCanFly(true);
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY);
|
||||
}
|
||||
else
|
||||
SetDisableGravity(true);
|
||||
|
||||
@@ -3120,6 +3123,11 @@ void Creature::UpdateMovementFlags()
|
||||
SetCanFly(false);
|
||||
SetDisableGravity(false);
|
||||
|
||||
if (info->InhabitType & INHABIT_GROUND)
|
||||
{
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_GROUND);
|
||||
}
|
||||
|
||||
if (IsAlive() && (CanHover() || HasAuraType(SPELL_AURA_HOVER)))
|
||||
SetHover(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user