mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
refactor(Core/Spells): Add helpers for HasAuraType (#20802)
This commit is contained in:
@@ -1058,7 +1058,7 @@ void Creature::DoFleeToGetAssistance()
|
||||
if (!GetVictim())
|
||||
return;
|
||||
|
||||
if (HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
|
||||
if (HasPreventsFleeingAura())
|
||||
return;
|
||||
|
||||
float radius = sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
|
||||
@@ -2669,7 +2669,7 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool skipDistCheck) const
|
||||
|
||||
// pussywizard: don't check distance to home position if recently damaged (allow kiting away from spawnpoint!)
|
||||
// xinef: this should include taunt auras
|
||||
if (!isWorldBoss() && (GetLastLeashExtensionTime() + 12 > GameTime::GetGameTime().count() || HasAuraType(SPELL_AURA_MOD_TAUNT)))
|
||||
if (!isWorldBoss() && (GetLastLeashExtensionTime() + 12 > GameTime::GetGameTime().count() || HasTauntAura()))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3459,14 +3459,14 @@ void Creature::UpdateMovementFlags()
|
||||
else
|
||||
SetDisableGravity(true);
|
||||
|
||||
if (!HasAuraType(SPELL_AURA_HOVER))
|
||||
if (!HasHoverAura())
|
||||
SetHover(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCanFly(false);
|
||||
SetDisableGravity(false);
|
||||
if (IsAlive() && (CanHover() || HasAuraType(SPELL_AURA_HOVER)))
|
||||
if (IsAlive() && (CanHover() || HasHoverAura()))
|
||||
SetHover(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user