Core/Instances: Instance lock rewrite (WIP)

Port From (https://github.com/TrinityCore/TrinityCore/commit/17665c929c3a9fb7fe75dd680648129bc1c1f874)
This commit is contained in:
hondacrx
2022-10-04 10:00:07 -04:00
parent d21624fd87
commit d3dde761a2
27 changed files with 907 additions and 431 deletions
-16
View File
@@ -103,22 +103,6 @@ namespace Game.Chat
}
}
// if the player or the player's group is bound to another instance
// the player will not be bound to another one
InstanceBind bind = _player.GetBoundInstance(target.GetMapId(), target.GetDifficultyID(map.GetEntry()));
if (bind == null)
{
Group group = _player.GetGroup();
// if no bind exists, create a solo bind
InstanceBind gBind = group ? group.GetBoundInstance(target) : null; // if no bind exists, create a solo bind
if (gBind == null)
{
InstanceSave save = Global.InstanceSaveMgr.GetInstanceSave(target.GetInstanceId());
if (save != null)
_player.BindToInstance(save, !save.CanReset());
}
}
if (map.IsRaid())
{
_player.SetRaidDifficultyID(target.GetRaidDifficultyID());