Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura) - this time without additional changes (argh!)
This commit is contained in:
@@ -11578,10 +11578,10 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
|
|||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
||||||
{
|
{
|
||||||
SpellInfo const* inmmuneSpellInfo = sSpellMgr->GetSpellInfo(itr->spellId);
|
SpellInfo const* immuneSpellInfo = sSpellMgr->GetSpellInfo(itr->spellId);
|
||||||
if ((itr->type & spellInfo->GetSchoolMask())
|
if ((itr->type & spellInfo->GetSchoolMask())
|
||||||
&& !(inmmuneSpellInfo->IsPositive() && spellInfo->IsPositive())
|
&& !(immuneSpellInfo && immuneSpellInfo->IsPositive() && spellInfo->IsPositive())
|
||||||
&& !spellInfo->CanPierceImmuneAura(inmmuneSpellInfo))
|
&& !spellInfo->CanPierceImmuneAura(immuneSpellInfo))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user