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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user