*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

View File

@@ -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();)