public static void SelectObjectHandler(ZoneClient client, Packet packet)
{
ushort id;
if (!packet.TryReadUShort(out id))
{
Log.WriteLine(LogLevel.Warn, "Could not read entity select request.");
return;
}
MapObject mo;
// Try to see if there is a map object with this ID
if (!client.Character.Map.Objects.TryGetValue(id, out mo))
{
client.Character.CharacterInTarget = mo;
return; // Nothing found. Just return lawl
}
mo.SelectedBy.Add(client.Character);
if (mo is ZoneCharacter || mo is Mob)
{
client.Character.SelectedObject = mo;
SendStatsUpdate(mo, client, false);
}
}