aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rw-r--r--src/server/game/Maps/MapManager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 2fd1ed03232..2d7660ce3c8 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -85,7 +85,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);
@@ -101,7 +102,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();
@@ -141,7 +142,7 @@ BattlegroundMap* MapManager::CreateBattleground(uint32 mapId, uint32 instanceId,
- 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;
@@ -216,7 +217,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