Core/Auras: added sanity checks for area auras having a different owner unit than caster

Closes #21517
This commit is contained in:
ariel- authored and Aokromes committed 2018-03-05 14:19:22 +01:00
1 parent 22807ebf8a
commit 0321955726
2 files changed
+23 -1

No files matched your search

+7
View File
@@ -4297,6 +4297,13 @@ void SpellMgr::LoadSpellInfoCorrections()
if (spellInfo->IsPassive() && GetTalentSpellCost(i))
if (spellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_PET)
spellInfo->Effects[j].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER);
// Area auras may not target area (they're self cast)
if (spellInfo->Effects[j].IsAreaAuraEffect() && spellInfo->Effects[j].IsTargetingArea())
{
spellInfo->Effects[j].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER);
spellInfo->Effects[j].TargetB = SpellImplicitTargetInfo(0);
}
}
// disable proc for magnet auras, they're handled differently