Merge pull request #1921 from zwerg/master

Fix problem with removing immunities by Unit::ApplySpellImmune
This commit is contained in:
QAston
2011-06-11 04:19:50 -07:00
+1 -2
View File
@@ -11892,14 +11892,13 @@ void Unit::ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
{ {
for (SpellImmuneList::iterator itr = m_spellImmune[op].begin(); itr != m_spellImmune[op].end(); ++itr) for (SpellImmuneList::iterator itr = m_spellImmune[op].begin(); itr != m_spellImmune[op].end(); ++itr)
{ {
if (itr->spellId == spellId) if (itr->spellId == spellId && itr->type == type)
{ {
m_spellImmune[op].erase(itr); m_spellImmune[op].erase(itr);
break; break;
} }
} }
} }
} }
void Unit::ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType type, bool apply) void Unit::ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType type, bool apply)