Core/Movement: Remove MOVEMENTFLAG_FLYING on fly aura unapply as well as _CAN_FLY

This commit is contained in:
Machiavelli
2012-03-16 23:41:43 +01:00
parent 85da463686
commit cf5ed0a7b6
@@ -2846,6 +2846,8 @@ void AuraEffect::HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode
//! Not entirely sure if this should be sent for creatures as well, but I don't think so.
target->SetCanFly(apply);
if (!apply)
target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
Player* player = target->ToPlayer();
if (!player)
player = target->m_movedPlayer;
@@ -3231,6 +3233,8 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp,
if (mode & AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK && (apply || (!target->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !target->HasAuraType(SPELL_AURA_FLY))))
{
target->SetCanFly(apply);
if (!apply)
target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
Player* player = target->ToPlayer();
if (!player)
player = target->m_movedPlayer;