*Fix a dead loop in aura update. Sorry. Thanks to QAston for pointing out the mistake.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-07 15:34:17 -05:00
parent c1388e0b54
commit fe7a8e1bc9
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -6273,7 +6273,7 @@ void Player::DuelComplete(DuelCompleteType type)
if(!duel) if(!duel)
return; 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)); WorldPacket data(SMSG_DUEL_COMPLETE, (1));
data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0); data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0);
+5 -3
View File
@@ -3223,8 +3223,12 @@ void Unit::_UpdateSpells( uint32 time )
Aura *aur = i->second; Aura *aur = i->second;
// prevent double update // prevent double update
if (aur->IsUpdated()) if(aur->IsUpdated())
{
++i;
continue; continue;
}
aur->SetUpdated(true); aur->SetUpdated(true);
uint32 removedAuras = m_removedAuras.size(); uint32 removedAuras = m_removedAuras.size();
@@ -3232,9 +3236,7 @@ void Unit::_UpdateSpells( uint32 time )
// several auras can be deleted due to update // several auras can be deleted due to update
if(removedAuras < m_removedAuras.size()) if(removedAuras < m_removedAuras.size())
{
i = m_Auras.begin(); i = m_Auras.begin();
}
else else
++i; ++i;
} }