BattleGroundMap* MapManager::CreateBattleGroundMap(uint32 id, uint32 InstanceId, BattleGround* bg) { DEBUG_LOG("MapInstanced::CreateBattleGroundMap: instance:%d for map:%d and bgType:%d created.", InstanceId, id, bg->GetTypeID()); BattleGroundMap *map = new BattleGroundMap(id, i_gridCleanUpDelay, InstanceId); MANGOS_ASSERT(map->IsBattleGround()); map->SetBG(bg); bg->SetBgMap(map); //add map into map container i_maps[MapID(id, InstanceId)] = map; // BGs/Arenas not have saved instance data map->CreateInstanceData(false); return map; }