From 08ea000c1b948e31d6c8c9bebb3e2d4ca3342f47 Mon Sep 17 00:00:00 2001 From: Treeston Date: Wed, 29 Aug 2018 13:50:29 +0200 Subject: [PATCH] Core/Maps: Properly re-create map on login for ephemeral player saves. Because it bugged me to no end when testing anything ever. --- src/server/game/Maps/MapInstanced.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 7728862869c..0e438c51e32 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -155,7 +155,9 @@ Map* MapInstanced::CreateInstanceForPlayer(uint32 mapId, Player* player, uint32 if (loginInstanceId) // if the player has a saved instance id on login, we either use this instance or relocate him out (return null) { map = FindInstanceMap(loginInstanceId); - return (map && map->GetId() == GetId()) ? map : nullptr; // is this check necessary? or does MapInstanced only find instances of itself? + if (!map && pSave && pSave->GetInstanceId() == loginInstanceId) + map = CreateInstance(loginInstanceId, pSave, pSave->GetDifficulty()); + return map; } InstanceGroupBind* groupBind = nullptr;