mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
*Cleanup, and fix a likely infinite loop, thanks thenecromancer
--HG-- branch : trunk
This commit is contained in:
@@ -695,7 +695,7 @@ void AddSC_eversong_woods()
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_prospector_anvilward";
|
||||
newscript->Name = "npc_prospector_anvilward";
|
||||
newscript->GetAI = &GetAI_npc_prospector_anvilward;
|
||||
newscript->pGossipHello = &GossipHello_npc_prospector_anvilward;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward;
|
||||
|
||||
@@ -1478,7 +1478,7 @@ void AddSC_boss_kaelthas()
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_kael_flamestrike";
|
||||
newscript->Name = "mob_kael_flamestrike";
|
||||
newscript->GetAI = &GetAI_mob_kael_flamestrike;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
|
||||
@@ -654,7 +654,7 @@ void AddSC_terokkar_forest()
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_isla_starmane";
|
||||
newscript->Name = "npc_isla_starmane";
|
||||
newscript->GetAI = &GetAI_npc_isla_starmaneAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_isla_starmane;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -4135,13 +4135,13 @@ void Unit::RemoveAllAuras()
|
||||
|
||||
void Unit::RemoveAllAuras(uint64 casterGUID, Aura * except /*=NULL*/, bool negative /*=true*/, bool positive /*=true*/)
|
||||
{
|
||||
AuraMap::iterator iter = m_Auras.begin();
|
||||
while (!m_Auras.empty())
|
||||
for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
|
||||
{
|
||||
Aura * aur = (*iter).second;
|
||||
if (aur != except && (!casterGUID || aur->GetCasterGUID()==casterGUID)
|
||||
&& ((negative && !aur->IsPositive()) || (positive && aur->IsPositive())))
|
||||
RemoveAura(aur);
|
||||
if (iter->second != except && (!casterGUID || iter->second->GetCasterGUID()==casterGUID)
|
||||
&& ((negative && !iter->second->IsPositive()) || (positive && iter->second->IsPositive())))
|
||||
RemoveAura(iter);
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user