Core/Maps: Properly re-create map on login for ephemeral player saves. Because it bugged me to no end when testing anything ever.

This commit is contained in:
Treeston authored and Aokromes committed 2018-08-29 19:03:15 +02:00
1 parent 4fdac92252
commit 08ea000c1b
1 file changed
+3 -1
+3 -1
View File
@@ -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) 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); 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; InstanceGroupBind* groupBind = nullptr;