Core/Movement: Allow entering water from flying mounts and druid flight form

Port From (https://github.com/TrinityCore/TrinityCore/commit/a37eb18008100f3b351c1046effdcea911cf4071)
This commit is contained in:
hondacrx
2021-03-04 21:53:18 -05:00
parent 9293b4ee17
commit 866b81af86
+4
View File
@@ -2218,6 +2218,8 @@ namespace Game.Spells
return;
}
target.SetCanTransitionBetweenSwimAndFly(apply);
if (target.SetCanFly(apply))
if (!apply && !target.IsLevitating())
target.GetMotionMaster().MoveFall();
@@ -2681,6 +2683,8 @@ namespace Game.Spells
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
if (mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask) && (apply || (!target.HasAuraType(AuraType.ModIncreaseMountedFlightSpeed) && !target.HasAuraType(AuraType.Fly))))
{
target.SetCanTransitionBetweenSwimAndFly(apply);
if (target.SetCanFly(apply))
if (!apply && !target.IsLevitating())
target.GetMotionMaster().MoveFall();