[9600] restored work of DeleteAllBattleGrounds

This commit is contained in:
balrok 2010-03-17 18:54:57 +01:00
parent 1f7f5955bf
commit 3db4616e17
2 changed files with 8 additions and 9 deletions

View file

@ -1138,16 +1138,15 @@ BattleGroundMgr::~BattleGroundMgr()
void BattleGroundMgr::DeleteAllBattleGrounds()
{
// will also delete template bgs:
for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
delete itr->second;
// destroy template battlegrounds that listed only in queues (other already terminated)
for(uint32 bgTypeId = 0; bgTypeId < MAX_BATTLEGROUND_TYPE_ID; ++bgTypeId)
{
// ~BattleGround call unregistring BG from queue
while(!BGFreeSlotQueue[bgTypeId].empty())
delete BGFreeSlotQueue[bgTypeId].front();
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
{
BattleGround * bg = itr->second;
itr++;
delete bg;
}
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9599"
#define REVISION_NR "9600"
#endif // __REVISION_NR_H__