mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[11486] Revert recent changes in BattleGroundMgr::DeleteAllBattleGrounds
Reason added in comment to code line.
This commit is contained in:
parent
c6b5064725
commit
6833efe12e
2 changed files with 7 additions and 3 deletions
|
|
@ -1143,8 +1143,12 @@ 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(); ++itr)
|
||||
delete itr->second;
|
||||
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
|
||||
{
|
||||
BattleGround * bg = itr->second;
|
||||
++itr; // step from invalidate iterator pos in result element remove in ~BattleGround call
|
||||
delete bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11485"
|
||||
#define REVISION_NR "11486"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue