refactor(Core/Spells): Add helpers for HasAuraType (#20802)

This commit is contained in:
Kitzunu
2024-12-01 12:50:59 +01:00
committed by GitHub
parent 55f6bd0972
commit ed008a8780
41 changed files with 183 additions and 140 deletions

View File

@@ -146,7 +146,7 @@ struct boss_faction_championsAI : public ScriptedAI
{
// check for stun, fear, etc.
// for casting, silence, disarm check individually in the ai
if (me->isFeared() || me->isFrozen() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasUnitState(UNIT_STATE_CONFUSED))
if (me->HasFearAura() || me->isFrozen() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasUnitState(UNIT_STATE_CONFUSED))
{
if (!IsHeroic())
return true;

View File

@@ -831,7 +831,7 @@ class spell_valkyr_touch_aura : public AuraScript
Map::PlayerList const& pl = caster->GetMap()->GetPlayers();
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
if (Player* plr = itr->GetSource())
if (plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
if (plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasSpiritOfRedemptionAura())
{
uint32 absorb = 0;
uint32 resist = 0;