aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-08-29 13:50:29 +0200
committerTreeston <treeston.mmoc@gmail.com>2018-08-29 13:50:29 +0200
commitdc86a8e5db549300f7cb7b2243654c105013f929 (patch)
treed2d743a242c8edcfc56deec165a5895e894e04ce /src
parent83ee145736a39ac1ce8305947f188aeaa13c7b04 (diff)
Core/Maps: Properly re-create map on login for ephemeral player saves. Because it bugged me to no end when testing anything ever.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Maps/MapInstanced.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index af766e13fb4..b4d4de69808 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;