diff options
author | QAston <qaston@gmail.com> | 2011-07-28 23:45:57 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-07-28 23:45:57 +0200 |
commit | fe913bf66c06ee05c804f1b081960097f2cbe244 (patch) | |
tree | e98a6b7d57e566cd049b968256f03f8ecebfe37e /src | |
parent | 495ead5f7fed7bde9e7a8c3501700969a4b2aaba (diff) |
Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura) - this time without additional changes (argh!)
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a7d84a4187f..d9799d81bac 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11578,10 +11578,10 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; 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()) - && !(inmmuneSpellInfo->IsPositive() && spellInfo->IsPositive()) - && !spellInfo->CanPierceImmuneAura(inmmuneSpellInfo)) + && !(immuneSpellInfo && immuneSpellInfo->IsPositive() && spellInfo->IsPositive()) + && !spellInfo->CanPierceImmuneAura(immuneSpellInfo)) return true; } } |