fix(Core/Movement): set proper flying animations for creatures with INHABIT_GROUND (#7589)

- Closes #7579
This commit is contained in:
UltraNix
2021-09-01 12:15:01 +02:00
committed by GitHub
parent d97863dc6c
commit 7965ea5aaa

View File

@@ -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);
}