예제 #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);
     }
 }
예제 #2
0
파일: Trade.cs 프로젝트: Dextan/Estrella
        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);
            }
        }
예제 #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);
     }
 }