Core/Creatures: Fix spell_school_immune_mask being applied against positive spells too
Port From (https://github.com/TrinityCore/TrinityCore/commit/96ec8477f0b9580881a955356a42fb3b109c0b49
This commit is contained in:
@@ -1278,7 +1278,9 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
SpellInfo immuneSpellInfo = Global.SpellMgr.GetSpellInfo(pair.Value, GetMap().GetDifficultyID());
|
||||
if (!(immuneSpellInfo != null && immuneSpellInfo.IsPositive() && spellInfo.IsPositive() && caster && IsFriendlyTo(caster)))
|
||||
// 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
|
||||
if ((immuneSpellInfo != null && !immuneSpellInfo.IsPositive()) || !spellInfo.IsPositive() || caster == null || !IsFriendlyTo(caster))
|
||||
if (!spellInfo.CanPierceImmuneAura(immuneSpellInfo))
|
||||
schoolImmunityMask |= pair.Key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user