Revert "feat(Core/Spells): improve SpellCheckRange(), spell cast when dismounting, falling or levitating spells (#3384)" (#5052)

This reverts commit b424273574.
This commit is contained in:
Stefano Borzì
2021-03-30 12:55:07 +02:00
committed by GitHub
parent c053e111d3
commit d4b8defcd8
3 changed files with 54 additions and 128 deletions

View File

@@ -2862,10 +2862,10 @@ void AuraEffect::HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode
return;
}
if (target->SetCanFly(apply) && !apply && !target->IsLevitating())
{
target->SetCanFly(apply);
if (!apply && target->GetTypeId() == TYPEID_UNIT && !target->IsLevitating())
target->GetMotionMaster()->MoveFall();
}
}
void AuraEffect::HandleAuraWaterWalk(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -3249,10 +3249,10 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp,
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
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 (target->SetCanFly(apply) && !apply && !target->IsLevitating())
{
target->SetCanFly(apply);
if (!apply && target->GetTypeId() == TYPEID_UNIT && !target->IsLevitating())
target->GetMotionMaster()->MoveFall();
}
}
//! Someone should clean up these hacks and remove it from this function. It doesn't even belong here.