mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
Core/Spells: Fix an incorrect check that was exempting negative spells from _IMMUNE_TO_x checks. Closes #21929.
This commit is contained in:
@@ -2884,7 +2884,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->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && unitTarget && unitTarget->IsImmuneToNPC())
|
||||
return false;
|
||||
|
||||
@@ -340,7 +340,8 @@ enum ReactStates
|
||||
REACT_DEFENSIVE = 1,
|
||||
REACT_AGGRESSIVE = 2
|
||||
};
|
||||
inline char const* DescribeReactState(ReactStates state) {
|
||||
inline char const* DescribeReactState(ReactStates state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case REACT_PASSIVE: return "PASSIVE";
|
||||
|
||||
Reference in New Issue
Block a user