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

(cherry picked from commit 75e7404bba)
This commit is contained in:
Treeston
2018-08-28 19:42:18 +02:00
committed by Shauren
parent 00b9c23e28
commit d81a74bc98

View File

@@ -2705,7 +2705,7 @@ bool WorldObject::IsValidAttackTarget(WorldObject const* target, SpellInfo const
return false;
// ignore immunity flags when assisting
if (!bySpell || (isPositiveSpell && !bySpell->HasAttribute(SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG)))
if (!bySpell || !(isPositiveSpell && bySpell->HasAttribute(SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG)))
{
if (unit && !unit->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED) && unitTarget && unitTarget->IsImmuneToNPC())
return false;