diff options
author | megamage <none@none> | 2009-04-07 15:34:17 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-07 15:34:17 -0500 |
commit | fe7a8e1bc92fd0a98ab4b050aa6681aea7ca10a2 (patch) | |
tree | c964f6e9f1deada8debb8f5be514e80ef14d8686 /src | |
parent | c1388e0b5418df0e31ae1dd714667b171058eff1 (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.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 10 |
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();) |