[12123] Move BattleGround code to separate BattleGround directory. Also some corrects to unload BG's

This commit is contained in:
rsa 2012-08-26 16:23:10 +04:00 committed by Antz
parent 19cae15ea0
commit de95d1d480
57 changed files with 293 additions and 280 deletions

View file

@ -49,7 +49,7 @@
#include "ScriptMgr.h"
#include "CreatureAIRegistry.h"
#include "Policies/SingletonImp.h"
#include "BattleGroundMgr.h"
#include "BattleGround/BattleGroundMgr.h"
#include "OutdoorPvP/OutdoorPvP.h"
#include "TemporarySummon.h"
#include "VMapFactory.h"
@ -141,6 +141,14 @@ World::~World()
// TODO free addSessQueue
}
/// Cleanups before world stop
void World::CleanupsBeforeStop()
{
KickAll(); // save and kick all players
UpdateSessions(1); // real players unload required UpdateSessions call
sBattleGroundMgr.DeleteAllBattleGrounds(); // unload battleground templates before different singletons destroyed
}
/// Find a player in a specified zone
Player* World::FindPlayerInZone(uint32 zone)
{