[7257] Fixed unexpected errors in log and non-freed memory at battleground system shutdown.

This commit is contained in:
VladimirMangos 2009-02-10 05:58:38 +03:00
parent 0e37851a11
commit 6bacf2239f
5 changed files with 27 additions and 7 deletions

View file

@ -27,6 +27,7 @@
#include "Timer.h"
#include "ObjectAccessor.h"
#include "MapManager.h"
#include "BattleGroundMgr.h"
#include "Database/DatabaseEnv.h"
@ -75,6 +76,9 @@ void WorldRunnable::run()
sWorld.KickAll(); // save and kick all players
sWorld.UpdateSessions( 1 ); // real players unload required UpdateSessions call
// unload battleground templates before different singletons destroyed
sBattleGroundMgr.DeleteAlllBattleGrounds();
sWorldSocketMgr->StopNetwork();
MapManager::Instance().UnloadAll(); // unload all grids (including locked in memory)