Merge commit 'origin/master' into 320

Conflicts:
	src/game/BattleGround.cpp
This commit is contained in:
tomrus88 2009-09-28 19:52:54 +04:00
commit 546f7a7fe5
47 changed files with 985 additions and 1264 deletions

View file

@ -135,7 +135,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
ASSERT(NewInstanceId);
map = _FindMap(NewInstanceId);
if(!map)
map = CreateBattleGround(NewInstanceId);
map = CreateBattleGroundMap(NewInstanceId, player->GetBattleGround());
}
else
{
@ -208,15 +208,16 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
return map;
}
BattleGroundMap* MapInstanced::CreateBattleGround(uint32 InstanceId)
BattleGroundMap* MapInstanced::CreateBattleGroundMap(uint32 InstanceId, BattleGround* bg)
{
// load/create a map
Guard guard(*this);
sLog.outDebug("MapInstanced::CreateBattleGround: map bg %d for %d created.", InstanceId, GetId());
sLog.outDebug("MapInstanced::CreateBattleGroundMap: instance:%d for map:%d and bgType:%d created.", InstanceId, GetId(), bg->GetTypeID());
BattleGroundMap *map = new BattleGroundMap(GetId(), GetGridExpiry(), InstanceId, this);
ASSERT(map->IsBattleGroundOrArena());
map->SetBG(bg);
m_InstancedMaps[InstanceId] = map;
return map;