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.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 01bf60ccde1..cf96a3cd19d 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3331,6 +3331,7 @@ void Spell::EffectSummonType(uint32 i)
EffectSummonGuardian(i);
break;
case SUMMON_TYPE_WILD:
+ case SUMMON_TYPE_WILD2:
EffectSummonWild(i);
break;
case SUMMON_TYPE_DEMON:
@@ -6242,24 +6243,22 @@ void Spell::EffectDispelMechanic(uint32 i)
uint32 mechanic = m_spellInfo->EffectMiscValue[i];
+ std::deque <Aura *> dispel_list;
+
Unit::AuraMap& Auras = unitTarget->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter = next)
+ for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter++)
{
- next = iter;
- ++next;
- SpellEntry const *spell = sSpellStore.LookupEntry(iter->second->GetSpellProto()->Id);
if (!iter->second->GetDispelChance(this))
continue;
+ SpellEntry const *spell = iter->second->GetSpellProto();
if(spell->Mechanic == mechanic || spell->EffectMechanic[iter->second->GetEffIndex()] == mechanic)
- {
- unitTarget->RemoveAurasDueToSpell(spell->Id);
- if(Auras.empty())
- break;
- else
- next = Auras.begin();
- }
+ dispel_list.push_back(iter->second);
+ }
+ for(;!dispel_list.empty();)
+ {
+ unitTarget->RemoveAurasDueToSpell(dispel_list.front()->GetId());
+ dispel_list.pop_front();
}
- return;
}
void Spell::EffectSummonDeadPet(uint32 /*i*/)