aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 7d56e3442b3..54bee661408 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2050,7 +2050,7 @@ void Spell::EffectTriggerSpell(uint32 i)
{
uint32 dispelMask = GetDispellMask(DISPEL_ALL);
Unit::AuraMap& Auras = m_caster->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); ++iter)
+ for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
{
// remove all harmful spells on you...
SpellEntry const* spell = iter->second->GetSpellProto();
@@ -2059,8 +2059,10 @@ void Spell::EffectTriggerSpell(uint32 i)
// ignore positive and passive auras
&& !iter->second->IsPositive() && !iter->second->IsPassive())
{
- m_caster->RemoveAura(iter->second);
+ m_caster->RemoveAura(iter);
}
+ else
+ iter++;
}
return;
}