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)
This commit is contained in:
@@ -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)
|
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);
|
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;
|
InstanceBind groupBind;
|
||||||
@@ -286,7 +288,6 @@ namespace Game.Maps
|
|||||||
{
|
{
|
||||||
public uint Parent;
|
public uint Parent;
|
||||||
public uint ScriptId;
|
public uint ScriptId;
|
||||||
public bool AllowMount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InstanceBind
|
public class InstanceBind
|
||||||
|
|||||||
Reference in New Issue
Block a user