Core/Movement: apply falling movement flag only when the player was able to fly or levitate. This fixes an issue preventing players from casting spells when dismounting from a flying mount

This commit is contained in:
Ovahlord
2018-11-23 13:19:36 +01:00
parent adc5c6f245
commit a2b2c8cdee

View File

@@ -14350,10 +14350,10 @@ bool Unit::SetCanFly(bool enable, bool packetOnly)
}
else
{
if (IsFlying() && !IsLevitating())
SetFall(true);
RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_MASK_MOVING_FLY);
RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS);
if (!IsLevitating())
SetFall(true);
}
}