Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }