mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9600] restored work of DeleteAllBattleGrounds
This commit is contained in:
parent
1f7f5955bf
commit
3db4616e17
2 changed files with 8 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9599"
|
||||
#define REVISION_NR "9600"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue