Ejemplo n.º 1
0
 public static void UpdateInventorySlot(ZoneCharacter pChar, byte pFromSlot, byte pFromInv, byte pToSlot, Item pItem)
 {
     using (var packet = new Packet(SH12Type.ModifyItemSlot))
     {
         packet.WriteByte(pFromSlot);
         packet.WriteByte(pFromInv);
         packet.WriteByte(pToSlot);
         packet.WriteByte(0x24);         // pToInv
         if (pItem == null)
         {
             packet.WriteUShort(0xffff);
         }
         else
         {
             if (pItem.ItemInfo.Slot == ItemSlot.None)
             {
                 pItem.WriteStats(packet);
             }
             else
             {
                 pItem.WriteEquipStats(packet);
             }
         }
         pChar.Client.SendPacket(packet);
     }
 }
Ejemplo n.º 2
0
        private void SendTradeAddItemTo(ZoneClient pClient,Item pItem,byte TradepSlot)
        {
            using (var packet = new Packet(SH19Type.SendAddItem))
            {
                packet.WriteByte(TradepSlot);
                if (pItem.ItemInfo.Slot == ItemSlot.None)

                    pItem.WriteStats(packet);

                else

                   pItem.WriteEquipStats(packet);

              pClient.SendPacket(packet);
            }
        }
Ejemplo n.º 3
0
 public static void ModifyInventorySlot(ZoneCharacter character, byte sourcestate, byte deststate, byte oldslot, byte newslot, Item item)
 {
     using (var packet = new Packet(SH12Type.ModifyItemSlot))
     {
         packet.WriteByte(oldslot);
         packet.WriteByte(sourcestate); //aka 'unequipped' bool
         packet.WriteByte(newslot);
         packet.WriteByte(deststate);
         if (item == null)
         {
             packet.WriteUShort(0xffff);
         }
         else
         {
             if (item.ItemInfo.Slot == ItemSlot.None)
             {
                 item.WriteStats(packet);
             }
             else
             {
                 item.WriteEquipStats(packet);
             }
         }
         character.Client.SendPacket(packet);
     }
 }