Core/Instances: Instance lock rewrite (WIP)
Port From (https://github.com/TrinityCore/TrinityCore/commit/17665c929c3a9fb7fe75dd680648129bc1c1f874)
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace Game.Chat
|
||||
if (player == null)
|
||||
return false;
|
||||
|
||||
DB.World.EscapeString(ref normalizedName);
|
||||
WorldDatabase.EscapeString(ref normalizedName);
|
||||
|
||||
SQLResult result = DB.World.Query($"SELECT c.position_x, c.position_y, c.position_z, c.orientation, c.map, ct.name FROM creature c INNER JOIN creature_template ct ON c.id = ct.entry WHERE ct.name LIKE '{normalizedName}'");
|
||||
if (result.IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user