Core/Maps: Ensure all child terrain maps are created before doing any thing on parent map such as loading respawn times and corpses (ported commit: f729050900)

This commit is contained in:
Ovahlord
2019-04-06 11:16:31 +02:00
parent 5955e67859
commit 8c80ea70fb

View File

@@ -103,17 +103,19 @@ Map* MapManager::CreateBaseMap_i(MapEntry const* mapEntry)
if (mapEntry->Instanceable())
map = new MapInstanced(mapEntry->ID, i_gridCleanUpDelay);
else
{
map = new Map(mapEntry->ID, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
map->LoadRespawnTimes();
map->LoadCorpseData();
}
i_maps[mapEntry->ID] = map;
for (uint32 childMapId : _parentMapData[mapEntry->ID])
map->AddChildTerrainMap(CreateBaseMap_i(sMapStore.AssertEntry(childMapId)));
if (!mapEntry->Instanceable())
{
map->LoadRespawnTimes();
map->LoadCorpseData();
}
return map;
}