diff options
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rw-r--r-- | src/server/game/Maps/MapManager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 902d665ca61..f3fefda4c94 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -86,7 +86,8 @@ Map* MapManager::CreateWorldMap(uint32 mapId, uint32 instanceId) return map; } -InstanceMap* MapManager::CreateInstance(uint32 mapId, uint32 instanceId, InstanceLock* instanceLock, Difficulty difficulty, TeamId team, Group* group) +InstanceMap* MapManager::CreateInstance(uint32 mapId, uint32 instanceId, InstanceLock* instanceLock, Difficulty difficulty, TeamId team, Group* group, + Optional<uint32> lfgDungeonsId) { // make sure we have a valid map id MapEntry const* entry = sMapStore.LookupEntry(mapId); @@ -102,7 +103,7 @@ InstanceMap* MapManager::CreateInstance(uint32 mapId, uint32 instanceId, Instanc TC_LOG_DEBUG("maps", "MapInstanced::CreateInstance: {}map instance {} for {} created with difficulty {}", instanceLock && instanceLock->IsNew() ? "" : "new ", instanceId, mapId, sDifficultyStore.AssertEntry(difficulty)->Name[sWorld->GetDefaultDbcLocale()]); - InstanceMap* map = new InstanceMap(mapId, i_gridCleanUpDelay, instanceId, difficulty, team, instanceLock); + InstanceMap* map = new InstanceMap(mapId, i_gridCleanUpDelay, instanceId, difficulty, team, instanceLock, lfgDungeonsId); ASSERT(map->IsDungeon()); map->LoadRespawnTimes(); @@ -150,7 +151,7 @@ GarrisonMap* MapManager::CreateGarrison(uint32 mapId, uint32 instanceId, Player* - create the instance if it's not created already - the player is not actually added to the instance (only in InstanceMap::Add) */ -Map* MapManager::CreateMap(uint32 mapId, Player* player) +Map* MapManager::CreateMap(uint32 mapId, Player* player, Optional<uint32> lfgDungeonsId /*= {}*/) { if (!player) return nullptr; @@ -225,7 +226,8 @@ Map* MapManager::CreateMap(uint32 mapId, Player* player) if (!map) { - map = CreateInstance(mapId, newInstanceId, instanceLock, difficulty, GetTeamIdForTeam(sCharacterCache->GetCharacterTeamByGuid(instanceOwnerGuid)), group); + map = CreateInstance(mapId, newInstanceId, instanceLock, difficulty, GetTeamIdForTeam(sCharacterCache->GetCharacterTeamByGuid(instanceOwnerGuid)), group, + lfgDungeonsId); if (group) group->SetRecentInstance(mapId, instanceOwnerGuid, newInstanceId); else |