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: f7290509005d3b93bb62149faf3add0bb7f54f51)

This commit is contained in:
Ovahlord committed 2019-04-06 11:16:31 +02:00
1 parent 5955e67859
commit 8c80ea70fb
1 file changed
+6 -4
+6 -4
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;
}