aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-04-06 11:13:34 +0200
committerShauren <shauren.trinity@gmail.com>2019-04-06 11:13:34 +0200
commitf7290509005d3b93bb62149faf3add0bb7f54f51 (patch)
tree6c437e3eaa2c47deb009c01ea76e4177834a765c
parent4ddaa6cf69c5f9e2c032c99541d29c7d39d4fb94 (diff)
Core/Maps: Ensure all child terrain maps are created before doing anything on parent map such as loading respawn times and corpses
-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 fd9aae38386..431c56f36f3 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -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;
}