aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-01-24 18:26:29 +0100
committerQAston <none@none>2010-01-24 18:26:29 +0100
commit492fe452fd816ed78cea2f7f340ed325a66425de (patch)
treebb811042397db86c6a6b8f7aaf4e17e3431832c9 /src/game/SpellAuras.cpp
parent8710fe8fa07d569a2f398d75ab34fcefb2324b2f (diff)
*Bring back one unintentionally removed check in Aura::UpdateOwner
*Remove not blizzlike hack for Vanish (it should not remove delayed spells from player) --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 7c7ff437801..b6c7b30de23 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -444,12 +444,13 @@ void Aura::_Remove(AuraRemoveMode removeMode)
{
assert (!m_isRemoved);
m_isRemoved = true;
- for (ApplicationMap::iterator appItr = m_applications.begin() ; appItr != m_applications.end() ;)
+ ApplicationMap::iterator appItr = m_applications.begin();
+ while(!m_applications.empty())
{
AuraApplication * aurApp = appItr->second;
Unit * target = aurApp->GetTarget();
- ++appItr;
target->_UnapplyAura(aurApp, removeMode);
+ appItr = m_applications.begin();
}
}
@@ -592,10 +593,13 @@ void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
Update(diff, caster);
- if (m_updateTargetMapInterval <= diff)
- UpdateTargetMap(caster);
- else
- m_updateTargetMapInterval -= diff;
+ if (!IsRemoved())
+ {
+ if (m_updateTargetMapInterval <= diff)
+ UpdateTargetMap(caster);
+ else
+ m_updateTargetMapInterval -= diff;
+ }
// update aura effects
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)