Core/Units: flight and hover checks will now consider movement template data as well as manually set flight states

Port From (https://github.com/TrinityCore/TrinityCore/commit/294657f7dd4d2db1ca6dcf66f0b0895c6ba92949)
This commit is contained in:
hondacrx
2022-02-22 19:59:03 -05:00
parent 236f1d6999
commit bc52ff717a
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -2162,7 +2162,7 @@ namespace Game.Spells
target.SetCanTransitionBetweenSwimAndFly(apply);
if (target.SetCanFly(apply))
if (!apply && !target.IsLevitating())
if (!apply && !target.IsGravityDisabled())
target.GetMotionMaster().MoveFall();
}
@@ -2618,7 +2618,7 @@ namespace Game.Spells
target.SetCanTransitionBetweenSwimAndFly(apply);
if (target.SetCanFly(apply))
if (!apply && !target.IsLevitating())
if (!apply && !target.IsGravityDisabled())
target.GetMotionMaster().MoveFall();
}