mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[7257] Fixed unexpected errors in log and non-freed memory at battleground system shutdown.
This commit is contained in:
parent
0e37851a11
commit
6bacf2239f
5 changed files with 27 additions and 7 deletions
|
|
@ -1322,6 +1322,9 @@ void BattleGround::SpawnBGCreature(uint32 type, uint32 respawntime)
|
|||
*/
|
||||
bool BattleGround::DelCreature(uint32 type)
|
||||
{
|
||||
if(!m_BgCreatures[type])
|
||||
return true;
|
||||
|
||||
Creature *cr = HashMapHolder<Creature>::Find(m_BgCreatures[type]);
|
||||
if(!cr)
|
||||
{
|
||||
|
|
@ -1336,6 +1339,9 @@ bool BattleGround::DelCreature(uint32 type)
|
|||
|
||||
bool BattleGround::DelObject(uint32 type)
|
||||
{
|
||||
if(!m_BgObjects[type])
|
||||
return true;
|
||||
|
||||
GameObject *obj = HashMapHolder<GameObject>::Find(m_BgObjects[type]);
|
||||
if(!obj)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue