aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-07 15:34:17 -0500
committermegamage <none@none>2009-04-07 15:34:17 -0500
commitfe7a8e1bc92fd0a98ab4b050aa6681aea7ca10a2 (patch)
treec964f6e9f1deada8debb8f5be514e80ef14d8686 /src/game/Unit.cpp
parentc1388e0b5418df0e31ae1dd714667b171058eff1 (diff)
*Fix a dead loop in aura update. Sorry. Thanks to QAston for pointing out the mistake.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 21a6ec75e7e..83bf327d309 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3223,8 +3223,12 @@ void Unit::_UpdateSpells( uint32 time )
Aura *aur = i->second;
// prevent double update
- if (aur->IsUpdated())
+ if(aur->IsUpdated())
+ {
+ ++i;
continue;
+ }
+
aur->SetUpdated(true);
uint32 removedAuras = m_removedAuras.size();
@@ -3232,11 +3236,9 @@ void Unit::_UpdateSpells( uint32 time )
// several auras can be deleted due to update
if(removedAuras < m_removedAuras.size())
- {
i = m_Auras.begin();
- }
else
- ++i;
+ ++i;
}
for(AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end();)