diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index c0a842d92..fb4d9e5dd 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -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; + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7e75f8bf1..0736bf6b4 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9599" + #define REVISION_NR "9600" #endif // __REVISION_NR_H__