Beispiel #1
0
        public static void SendTestItem(Session pSession, int pItemID, short pSlot = 1)
        {
            Packet packet = new Packet(0x0025);

            packet.WriteBool(true); // Unstuck

            packet.WriteByte(1);    // Items
            packet.WriteByte(0);    // Mode

            {
                packet.WriteByte(0);                         // New item
                packet.WriteByte((byte)(pItemID / 1000000)); // Inventory
                packet.WriteShort(pSlot);

                byte type = 2;
                if (pItemID / 1000000 == 1)
                {
                    type = 1;
                }
                else if (pItemID / 10000 == 500)
                {
                    type = 3;                              // Pet
                }
                if (type == 1)
                {
                    ItemEquip equip = new ItemEquip(pItemID); // Wizet Invincible Hat 2
                    equip.Write(packet);
                }
                else if (type == 2)
                {
                    ItemRechargable regitem = new ItemRechargable(pItemID);
                    regitem.Write(packet);
                }
                else if (type == 2)
                {
                    ItemPet pet = new ItemPet(pItemID);
                    pet.Write(packet);
                }
            }


            pSession.SendPacket(packet);
        }
Beispiel #2
0
        public static void SendTestItem(Session pSession, int pItemID, short pSlot = 1)
        {
            Packet packet = new Packet(0x0025);
            packet.WriteBool(true); // Unstuck

            packet.WriteByte(1); // Items
            packet.WriteByte(0); // Mode

            {
                packet.WriteByte(0); // New item
                packet.WriteByte((byte)(pItemID / 1000000)); // Inventory
                packet.WriteShort(pSlot);

                byte type = 2;
                if (pItemID / 1000000 == 1) type = 1;
                else if (pItemID / 10000 == 500) type = 3; // Pet

                if (type == 1)
                {
                    ItemEquip equip = new ItemEquip(pItemID); // Wizet Invincible Hat 2
                    equip.Write(packet);
                }
                else if (type == 2)
                {
                    ItemRechargable regitem = new ItemRechargable(pItemID);
                    regitem.Write(packet);
                }
                else if (type == 2)
                {
                    ItemPet pet = new ItemPet(pItemID);
                    pet.Write(packet);
                }
            }


            pSession.SendPacket(packet);
        }