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

Port From (https://github.com/TrinityCore/TrinityCore/commit/6c642f33b58ce81eb5b1345a7f0eb89de6040251)
This commit is contained in:
hondacrx
2021-08-20 18:50:01 -04:00
parent 129c973ca0
commit 936f9d4d93
2 changed files with 24 additions and 2 deletions
+7
View File
@@ -2962,6 +2962,13 @@ namespace Game.Entities
if (effect.TargetA.GetSelectionCategory() == SpellTargetSelectionCategories.Cone || effect.TargetB.GetSelectionCategory() == SpellTargetSelectionCategories.Cone)
if (MathFunctions.fuzzyEq(spellInfo.ConeAngle, 0.0f))
spellInfo.ConeAngle = 90.0f;
// Area auras may not target area (they're self cast)
if (effect.IsAreaAuraEffect() && effect.IsTargetingArea())
{
effect.TargetA = new(Targets.UnitCaster);
effect.TargetB = new();
}
}
// disable proc for magnet auras, they're handled differently