From fd930d4c830c36bddc9b2a5fd3650b41a914ed38 Mon Sep 17 00:00:00 2001 From: Treeston Date: Wed, 29 Aug 2018 13:50:29 +0200 Subject: Core/Maps: Properly re-create map on login for ephemeral player saves. Because it bugged me to no end when testing anything ever. (cherry picked from commit dc86a8e5db549300f7cb7b2243654c105013f929) --- src/server/game/Maps/MapInstanced.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server/game/Maps/MapInstanced.cpp') diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 1aa047b9f37..38d3143463c 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -154,7 +154,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->GetDifficultyID(), player->GetTeamId()); + return map; } InstanceGroupBind* groupBind = nullptr; -- cgit v1.2.3