Example #1
0
        /// <summary>
        /// Send the ammount of ground Item to defined Inventory Slot.
        /// </summary>
        public void GroundToSlot(IItem item, InventoryID destiny, Location sqm, uint stackPosition)
        {
            #region " Packet Structure Analyze "
            // SZ    ID   X     Y   ZZ  ITM  ??       ST       QT
            //---------------------------------------------------
            // 0F 00 78 14 7E ED 7B 07 CD 0C 01 FF FF 06 00 00 04
            //---------------------------------------------------
            // 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
            #endregion

            var Builder = new PacketBuilder(0x78, Connection);
            Builder.Append(sqm.X);
            Builder.Append(sqm.Y);
            Builder.Append(sqm.Z);
            Builder.Append(item.Id);
            Builder.Append(stackPosition);
            Builder.Append(0xFF);
            Builder.Append(0xFF);
            Builder.Append(destiny.GetHashCode());
            Builder.Append(0x00);
            Builder.Append(0x00);
            Builder.Append(item.Count);
            Connection.Send(Builder.GetPacket());
        }
Example #2
0
        /// <summary>
        /// Send the ammount of stacked Item to defined Inventory Slot.
        /// </summary>
        public void SlotToSlot(IItem item, InventoryID toSlot)
        {
            #region " Packet Structure Analyze "
            //---------------------------------------------------
            // SZ    ID       ST        ITM           ST       QT
            // 0F 00 78 FF FF 06 00 00 D6 0C 00 FF FF 0A 00 00 01
            //---------------------------------------------------
            // 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
            //---------------------------------------------------
            #endregion

            var Builder = new PacketBuilder(0x78, Connection);
            Builder.Append(0xFF);
            Builder.Append(0XFF);
            Builder.Append(item.Slot.Id.GetHashCode());
            Builder.Append(0x00);
            Builder.Append(0x00);
            Builder.Append(item.Id);
            Builder.Append(0x00);
            Builder.Append(0xFF);
            Builder.Append(0xFF);
            Builder.Append(toSlot.GetHashCode());
            Builder.Append(0x00);
            Builder.Append(0x00);
            Builder.Append(item.Count);
            Connection.Send(Builder.GetPacket());
        }
Example #3
0
        /// <summary>
        /// Send the ammount of stacked Item to defined Inventory Slot.
        /// </summary>
        public void ContainerToSlot(ISlot fromSlot, InventoryID toSloT)
        {
            #region " Packet Structure Analyze "
            //---------------------------------------------------
            // SZ    ID       BP    ST  ITM  ST       ST       QT
            // 0F 00 78 FF FF 40 00 03 CD 0C 03 FF FF 06 00 00 04
            //---------------------------------------------------
            // 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
            //---------------------------------------------------
            #endregion

            var Builder = new PacketBuilder(0x78, Connection);
            Builder.Append(0xFF);
            Builder.Append(0xFF);
            Builder.Append(fromSlot.Container.Position);
            Builder.Append(0x00);
            Builder.Append(fromSlot.Position);
            Builder.Append(fromSlot.Item.Id);
            Builder.Append(fromSlot.Position);
            Builder.Append(0xFF);
            Builder.Append(0xFF);
            Builder.Append(toSloT.GetHashCode());
            Builder.Append(0x00);
            Builder.Append(0x00);
            Builder.Append(fromSlot.Item.Count);
            Connection.Send(Builder.GetPacket());
        }