Core/Creatures: Fix spell_school_immune_mask being applied against positive spells too (#23999)
This commit is contained in:
1 parent
d2918d2138
commit
b052d23c4f
1 file changed
+3
-1
@@ -7373,7 +7373,9 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo, WorldObject const* caste
|
||||
continue;
|
||||
|
||||
SpellInfo const* immuneSpellInfo = sSpellMgr->GetSpellInfo(itr->second);
|
||||
if (!(immuneSpellInfo && 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 && !immuneSpellInfo->IsPositive()) || !spellInfo->IsPositive() || !caster || !IsFriendlyTo(caster))
|
||||
if (!spellInfo->CanPierceImmuneAura(immuneSpellInfo))
|
||||
schoolImmunityMask |= itr->first;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user