Core/Auras: Fixed requireImmunityPurgesEffectAttribute logic for school immunities
Port From (https://github.com/TrinityCore/TrinityCore/commit/ffbde7cccc6b0d697f915345c48e2b70dc110f38)
This commit is contained in:
@@ -1295,10 +1295,13 @@ namespace Game.Entities
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
SpellInfo immuneSpellInfo = Global.SpellMgr.GetSpellInfo(pair.Value, GetMap().GetDifficultyID());
|
SpellInfo immuneSpellInfo = Global.SpellMgr.GetSpellInfo(pair.Value, GetMap().GetDifficultyID());
|
||||||
|
if (requireImmunityPurgesEffectAttribute)
|
||||||
|
if (immuneSpellInfo == null || !immuneSpellInfo.HasAttribute(SpellAttr1.ImmunityPurgesEffect))
|
||||||
|
continue;
|
||||||
|
|
||||||
// Consider the school immune if any of these conditions are not satisfied.
|
// Consider the school immune if any of these conditions are not satisfied.
|
||||||
// In case of no immuneSpellInfo, ignore that condition and check only the other conditions
|
// In case of no immuneSpellInfo, ignore that condition and check only the other conditions
|
||||||
if ((immuneSpellInfo != null && !immuneSpellInfo.IsPositive() && (!requireImmunityPurgesEffectAttribute || immuneSpellInfo.HasAttribute(SpellAttr1.ImmunityPurgesEffect)))
|
if ((immuneSpellInfo != null && !immuneSpellInfo.IsPositive()) || !spellInfo.IsPositive() || caster == null || !IsFriendlyTo(caster))
|
||||||
|| !spellInfo.IsPositive() || caster == null || !IsFriendlyTo(caster))
|
|
||||||
if (!spellInfo.CanPierceImmuneAura(immuneSpellInfo))
|
if (!spellInfo.CanPierceImmuneAura(immuneSpellInfo))
|
||||||
schoolImmunityMask |= pair.Key;
|
schoolImmunityMask |= pair.Key;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user