public static void SendPlacedItemInInventory(Character chr, BaseItem item) { var pw = GetPacketWriter(CashPacketOpcodes.S_MoveLtoS_Done); pw.WriteShort(item.InventorySlot); pw.WriteByte(Constants.getInventory(item.ItemID)); item.Encode(pw); chr.SendPacket(pw); }
public static void AddItemDataWithAmount(Packet packet, BaseItem item, short slot, bool shortslot, short amount) { if (slot != 0) { if (shortslot) { packet.WriteShort(slot); } else { slot = Math.Abs(slot); if (slot > 100) { slot -= 100; } packet.WriteByte((byte)slot); } } item.Encode(packet); }