mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +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:
|
// will also delete template bgs:
|
||||||
for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
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)
|
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
|
||||||
delete itr->second;
|
{
|
||||||
|
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__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11485"
|
#define REVISION_NR "11486"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue