/// <summary> /// Sends the item data to a client. /// </summary> /// <param name="client">The client to send it to.</param> /// <param name="data">The packet data.</param> public void SendPacket(Entities.GameClient client, ushort data) { if (!client.LoggedIn) { return; } using (var itempacket = new Packets.ItemInfoPacket()) { itempacket.UID = UID; itempacket.ItemID = ItemID; itempacket.CurrentDura = (ushort)CurrentDura; itempacket.MaxDura = (ushort)MaxDura; itempacket.Data = data; itempacket.Location = Location; itempacket.SocketAndRGB = SocketAndRGB; itempacket.Gem1 = Gem1; itempacket.Gem2 = Gem2; itempacket.Unknown2 = 0; itempacket.RebornEffect = RebornEffect; itempacket.Plus = Plus; itempacket.Bless = Bless; itempacket.Free = Free; itempacket.Enchant = Enchant; itempacket.GreenText = GreenText; itempacket.Suspicious = Suspicious; itempacket.Locked = Locked; itempacket.Color = (byte)Color; itempacket.Composition = Composition; itempacket.INS = INS; itempacket.LockedTime = LockedTime; if (IsArrow()) { itempacket.Amount = AmountLimit; } client.Send(itempacket); } }
/// <summary> /// Sends the item data to a client. /// </summary> /// <param name="client">The client to send it to.</param> /// <param name="data">The packet data.</param> public void SendPacket(Entities.GameClient client, ushort data) { if (!client.LoggedIn) return; using (var itempacket = new Packets.ItemInfoPacket()) { itempacket.UID = UID; itempacket.ItemID = ItemID; itempacket.CurrentDura = (ushort)CurrentDura; itempacket.MaxDura = (ushort)MaxDura; itempacket.Data = data; itempacket.Location = Location; itempacket.SocketAndRGB = SocketAndRGB; itempacket.Gem1 = Gem1; itempacket.Gem2 = Gem2; itempacket.Unknown2 = 0; itempacket.RebornEffect = RebornEffect; itempacket.Plus = Plus; itempacket.Bless = Bless; itempacket.Free = Free; itempacket.Enchant = Enchant; itempacket.GreenText = GreenText; itempacket.Suspicious = Suspicious; itempacket.Locked = Locked; itempacket.Color = (byte)Color; itempacket.Composition = Composition; itempacket.INS = INS; itempacket.LockedTime = LockedTime; if (IsArrow()) itempacket.Amount = AmountLimit; client.Send(itempacket); } }