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

Port From (https://github.com/TrinityCore/TrinityCore/commit/107ca37c6816aa53460b8d3200bfe45cc4c5e3aa)
This commit is contained in:
Hondacrx
2025-06-08 15:16:08 -04:00
parent 354f560a44
commit 4ace6f58c6
+2 -2
View File
@@ -1393,7 +1393,7 @@ namespace Game.Entities
if (immuneSpellInfo == null || !immuneSpellInfo.HasAttribute(SpellAttr1.ImmunityPurgesEffect))
continue;
if (immuneSpellInfo != null && !immuneSpellInfo.HasAttribute(SpellAttr1.ImmunityToHostileAndFriendlyEffects) && caster != null && !caster.IsFriendlyTo(this))
if (!(immuneSpellInfo != null && immuneSpellInfo.HasAttribute(SpellAttr1.ImmunityToHostileAndFriendlyEffects)) && caster != null && caster.IsFriendlyTo(this))
continue;
if (spellInfo.CanPierceImmuneAura(immuneSpellInfo))
@@ -1569,7 +1569,7 @@ namespace Game.Entities
if ((immuneAuraApply.GetMiscValue() & (int)spellInfo.GetSchoolMask()) == 0) // Check school
continue;
if (spellInfo.HasAttribute(SpellAttr1.ImmunityToHostileAndFriendlyEffects) || (caster != null && !IsFriendlyTo(caster))) // Harmful
if (immuneAuraApply.GetSpellInfo().HasAttribute(SpellAttr1.ImmunityToHostileAndFriendlyEffects) || (caster != null && !IsFriendlyTo(caster))) // Harmful
return true;
}
}