mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user