Core/Maps: Ensure all child terrain maps are created before doing anything on parent map such as loading respawn times and corpses
Port TrinityCore Commit: https://github.com/TrinityCore/TrinityCore/commit/f7290509005d3b93bb62149faf3add0bb7f54f51
This commit is contained in:
@@ -82,17 +82,19 @@ namespace Game.Entities
|
||||
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;
|
||||
|
||||
foreach (uint childMapId in _parentMapData[mapEntry.Id])
|
||||
map.AddChildTerrainMap(CreateBaseMap_i(CliDB.MapStorage.LookupByKey(childMapId)));
|
||||
|
||||
if (!mapEntry.Instanceable())
|
||||
{
|
||||
map.LoadRespawnTimes();
|
||||
map.LoadCorpseData();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user