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:
QAston
2011-07-28 23:45:57 +02:00
parent 495ead5f7f
commit fe913bf66c
+3 -3
View File
@@ -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;
} }
} }