diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-08-29 13:50:29 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-23 14:52:18 +0200 |
commit | fd930d4c830c36bddc9b2a5fd3650b41a914ed38 (patch) | |
tree | a02c3bd30d5ac862634b0a62b0982c2843963a31 /src | |
parent | 8760b7322e2d6417956fe5ddf08bb7b1268c734e (diff) |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Maps/MapInstanced.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |