aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-06 21:38:03 -0500
committermegamage <none@none>2009-09-06 21:38:03 -0500
commitf3aa98971691646c2fcc5c7ed040a577b216a8e4 (patch)
tree24d4b0e9d6b5f02997be0b14da7a1551b6d3c137 /src
parentd2079c0022ab9709b451a50443f24b1dcdffb7a8 (diff)
*Try to fix a crash caused by unstable affliction. Thanks to nanouniko
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index ccd378b0e72..39900935055 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3928,10 +3928,12 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
{
for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
{
- Aura * aur= iter->second;
+ Aura *aur = iter->second;
if (casterGUID == aur->GetCasterGUID())
{
- // Unstable Affliction
+ RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL);
+
+ // Unstable Affliction (crash if before removeaura?)
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags[1] & 0x0100))
{
if (AuraEffect const * aurEff = aur->GetPartAura(0))
@@ -3941,7 +3943,6 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,GetGUID());
}
}
- RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL);
return;
}
else