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

@@ -725,7 +725,7 @@ struct npc_hallows_end_soh : public ScriptedAI
bool checkBurningTriggers = false;
for (ObjectGuid const& guid : unitList)
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
if (c->HasAuraType(SPELL_AURA_PERIODIC_DUMMY))
if (c->HasPeriodicDummyAura())
{
checkBurningTriggers = true;
break;
@@ -743,7 +743,7 @@ struct npc_hallows_end_soh : public ScriptedAI
bool failed = false;
for (ObjectGuid const& guid : unitList)
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
if (c->HasAuraType(SPELL_AURA_PERIODIC_DUMMY))
if (c->HasPeriodicDummyAura())
{
failed = true;
break;
@@ -791,7 +791,7 @@ struct npc_hallows_end_soh : public ScriptedAI
{
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
{
if (!c->HasAuraType(SPELL_AURA_PERIODIC_DUMMY))
if (!c->HasPeriodicDummyAura())
{
tmpList.push_back(c);
}

View File

@@ -82,7 +82,7 @@ class spell_winter_wondervolt_trap : public SpellScript
if (Player* target = GetHitPlayer())
{
// check presence
if (target->HasAuraType(SPELL_AURA_TRANSFORM))
if (target->HasTransformAura())
return;
uint32 spellId = 0;