aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/game/Player.cpp2
-rw-r--r--src/game/Unit.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 2eeb5d3548c..ded28b9c9ec 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -6273,7 +6273,7 @@ void Player::DuelComplete(DuelCompleteType type)
if(!duel)
return;
- sLog.outDebug("Dual Complete %s %s", GetName(), duel->opponent->GetName());
+ sLog.outDebug("Duel Complete %s %s", GetName(), duel->opponent->GetName());
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0);
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();)