Core/Spells: Unify spell effect access api in both branches

This commit is contained in:
Shauren
2021-09-04 15:13:15 +02:00
parent 16ed458eee
commit 8a4e1119ac
90 changed files with 1485 additions and 1675 deletions

View File

@@ -305,9 +305,9 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
return;
}
for (SpellEffectInfo const* effect: spellInfo->GetEffects())
for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
{
if (effect && (effect->TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY || effect->TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY || effect->TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY))
if (spellEffectInfo.TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY || spellEffectInfo.TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY || spellEffectInfo.TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY)
return;
}