mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Maps: merged a crash fix for spawn group activation
* merged a change to recreate instance maps from orphaned saves
This commit is contained in:
@@ -153,7 +153,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;
|
||||
|
||||
Reference in New Issue
Block a user