mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Maps: Ensure all child terrain maps are created before doing anything on parent map such as loading respawn times and corpses
This commit is contained in:
@@ -102,17 +102,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, DIFFICULTY_NONE);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user