Core/Movement: Remove MOVEMENTFLAG_FLYING on fly aura unapply as well as _CAN_FLY
This commit is contained in:
@@ -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.
|
//! Not entirely sure if this should be sent for creatures as well, but I don't think so.
|
||||||
target->SetCanFly(apply);
|
target->SetCanFly(apply);
|
||||||
|
if (!apply)
|
||||||
|
target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||||
Player* player = target->ToPlayer();
|
Player* player = target->ToPlayer();
|
||||||
if (!player)
|
if (!player)
|
||||||
player = target->m_movedPlayer;
|
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))))
|
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);
|
target->SetCanFly(apply);
|
||||||
|
if (!apply)
|
||||||
|
target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||||
Player* player = target->ToPlayer();
|
Player* player = target->ToPlayer();
|
||||||
if (!player)
|
if (!player)
|
||||||
player = target->m_movedPlayer;
|
player = target->m_movedPlayer;
|
||||||
|
|||||||
Reference in New Issue
Block a user