diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-03-01 20:38:07 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2018-03-01 20:38:07 -0300 |
| commit | 54e841888621ce2ea6fbfde2f86842ec088cd575 (patch) | |
| tree | 5dffde96ff42aff6fa48ab6d0eaa6fab843f5493 /src/server/game/Spells/SpellMgr.cpp | |
| parent | fbb92047d7a0e4f3f2eacd749bb3c484d3b3bc88 (diff) | |
Core/Auras: added sanity checks for area auras having a different owner unit than caster
Closes #21517
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 12c4408c84f..f8a2f8b5ef2 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4814,6 +4814,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 |
