diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index 26e55a1eb86..1d3b5955fc2 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -566,7 +566,7 @@ class WorldMap : public Map private: using Map::GetPersistentState; // hide in subclass for overwrite public: - WorldMap(uint32 id, time_t expiry) : Map(id, expiry, 0, REGULAR_DIFFICULTY) {} + WorldMap(uint32 id, time_t expiry, uint32 InstanceId) : Map(id, expiry, InstanceId, REGULAR_DIFFICULTY) {} ~WorldMap() {} // can't be nullptr for loaded map diff --git a/src/game/Maps/MapManager.cpp b/src/game/Maps/MapManager.cpp index 7cedf66a1b5..f08d682c221 100644 --- a/src/game/Maps/MapManager.cpp +++ b/src/game/Maps/MapManager.cpp @@ -94,7 +94,7 @@ void MapManager::CreateContinents() uint32 continents[] = { 0, 1, 530, 571}; for (auto id : continents) { - Map* m = new WorldMap(id, i_gridCleanUpDelay); + Map* m = new WorldMap(id, i_gridCleanUpDelay, 0); // add map into container i_maps[MapID(id)] = m; @@ -133,9 +133,9 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj) if (m == nullptr) { std::lock_guard lock(m_lock); - m = new WorldMap(id, i_gridCleanUpDelay); + m = new WorldMap(id, i_gridCleanUpDelay, instanceId); // add map into container - i_maps[MapID(id)] = m; + i_maps[MapID(id, instanceId)] = m; // non-instanceable maps always expected have saved state m->Initialize();