/// <summary> /// Sends all the gears to the client and screen. /// </summary> public void SendGears() { Owner.SendToScreen(Owner.CreateSpawnPacket(), false); using (var itempacket = new Packets.ItemPacket()) { itempacket.Action = Enums.ItemAction.DisplayGears; itempacket.UID = Owner.EntityUID; itempacket.Data1 = 255; itempacket.SetGears(this); Owner.Send(itempacket); } }
/// <summary> /// Handling the QueryPlayer action from GeneralDataPacket. /// </summary> /// <param name="client">The client.</param> /// <param name="General">The GeneralDataPacket.</param> public static void Handle(Entities.GameClient client, GeneralDataPacket General) { uint uid = General.Data1; if (client.Map.MapObjects.ContainsKey(uid)) { Maps.IMapObject target = client.Map.MapObjects[uid]; if (target is Entities.GameClient) { (target as Entities.GameClient).Send(client.CreateSpawnPacket()); } if ((target is Entities.GameClient)) // or mob etc. { client.Send(target.CreateSpawnPacket()); } } }