diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-01-27 15:30:29 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-02-01 05:36:20 +0100 |
commit | 1547fd0d8a5bb0498f344aa5e0877081aace4bd7 (patch) | |
tree | 9f4fdf44648f79bd91dddcd554aa7ae7540da7cc /src | |
parent | 176d1e73e829584e18b12a1b12e76bb38983b6ea (diff) |
Core/Auras: Fixed SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS logic - no longer incorrectly unapplies all auras for immunities that don't use it
(cherry picked from commit 107ca37c6816aa53460b8d3200bfe45cc4c5e3aa)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 33adbbb33a3..8e3434c3242 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7625,7 +7625,7 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo, WorldObject const* caste if (!immuneSpellInfo || !immuneSpellInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT)) continue; - if (immuneSpellInfo && !immuneSpellInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS) && caster && !caster->IsFriendlyTo(this)) + if (!(immuneSpellInfo && immuneSpellInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS)) && caster && caster->IsFriendlyTo(this)) continue; if (spellInfo->CanPierceImmuneAura(immuneSpellInfo)) @@ -7799,7 +7799,7 @@ bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, SpellEffectInfo co if (!(immuneAuraApply->GetMiscValue() & spellInfo->GetSchoolMask())) // Check school continue; - if (spellInfo->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS) || (caster && !IsFriendlyTo(caster))) // Harmful + if (immuneAuraApply->GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS) || (caster && !IsFriendlyTo(caster))) // Harmful return true; } } |