Core/Spells: Fix an incorrect check that was exempting negative spells from _IMMUNE_TO_x checks.

Port From (https://github.com/TrinityCore/TrinityCore/commit/d81a74bc98533d6c443b59a945b7e92cc7e87295)
This commit is contained in:
hondacrx
2021-11-02 14:17:30 -04:00
parent 5e29a231c9
commit 6a159b90a1
+1 -1
View File
@@ -2343,7 +2343,7 @@ namespace Game.Entities
return false;
// ignore immunity flags when assisting
if (bySpell == null || (isPositiveSpell && !bySpell.HasAttribute(SpellAttr6.AssistIgnoreImmuneFlag)))
if (bySpell == null || !(isPositiveSpell && bySpell.HasAttribute(SpellAttr6.AssistIgnoreImmuneFlag)))
{
if (unit != null && !unit.HasUnitFlag(UnitFlags.PlayerControlled) && unitTarget != null && unitTarget.IsImmuneToNPC())
return false;