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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user