From d76e1918aa02c37ff99991db85f1ea9658afc70b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 2 Nov 2021 14:21:20 -0400 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. Port From (https://github.com/TrinityCore/TrinityCore/commit/fd930d4c830c36bddc9b2a5fd3650b41a914ed38) --- Source/Game/Maps/Instances/MapInstance.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Game/Maps/Instances/MapInstance.cs b/Source/Game/Maps/Instances/MapInstance.cs index 0f20460d1..598ff1443 100644 --- a/Source/Game/Maps/Instances/MapInstance.cs +++ b/Source/Game/Maps/Instances/MapInstance.cs @@ -121,7 +121,9 @@ namespace Game.Maps if (loginInstanceId != 0) // 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 : null; // is this check necessary? or does MapInstanced only find instances of itself? + if (map == null && pSave != null && pSave.GetInstanceId() == loginInstanceId) + map = CreateInstance(loginInstanceId, pSave, pSave.GetDifficultyID(), player.GetTeamId()); + return map; } InstanceBind groupBind; @@ -286,7 +288,6 @@ namespace Game.Maps { public uint Parent; public uint ScriptId; - public bool AllowMount; } public class InstanceBind