ReadItemGemInstanceData() public static method

public static ReadItemGemInstanceData ( WowPacketParser.Misc.Packet packet ) : void
packet WowPacketParser.Misc.Packet
return void
示例#1
0
        public static void ReadMailAttachedItem(Packet packet, params object[] idx)
        {
            packet.ReadByte("Position", idx);
            packet.ReadInt32("AttachID", idx);
            packet.ReadInt32("Count", idx);
            packet.ReadInt32("Charges", idx);
            packet.ReadInt32("MaxDurability", idx);
            packet.ReadInt32("Durability", idx);

            // ItemInstance
            V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, idx);

            packet.ResetBitReader();

            var bits1 = packet.ReadBits(4);
            var bits2 = packet.ReadBits(2);

            packet.ReadBit("Unlocked", idx);

            for (var i = 0; i < bits1; i++)
            {
                ItemHandler.ReadItemGemInstanceData(packet, idx, i);
            }

            for (var i = 0; i < bits2; i++)
            {
                ItemHandler.ItemEnchantInstanceData(packet, idx, i);
            }
        }
示例#2
0
        public static void ReadCliAuctionItem(Packet packet, params object[] idx)
        {
            V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, idx);

            packet.ReadInt32("Count", idx);
            packet.ReadInt32("Charges", idx);
            packet.ReadInt32("Flags", idx);
            packet.ReadInt32("AuctionItemID", idx);

            packet.ReadPackedGuid128("Owner", idx);

            packet.ReadUInt64("MinBid", idx);
            packet.ReadUInt64("MinIncrement", idx);
            packet.ReadUInt64("BuyoutPrice", idx);

            packet.ReadInt32("DurationLeft", idx);
            packet.ReadByte("DeleteReason", idx);

            var enchantmentsCount = packet.ReadBits("EnchantmentsCount", 4, idx);
            var gemsCount         = packet.ReadBits("GemsCount", 2, idx);

            var censorServerSideInfo = packet.ReadBit("CensorServerSideInfo");
            var censorBidInfo        = packet.ReadBit("CensorBidInfo");

            packet.ResetBitReader();

            for (int i = 0; i < gemsCount; i++)
            {
                ItemHandler.ReadItemGemInstanceData(packet, "Gems", idx, i);
            }

            for (int i = 0; i < enchantmentsCount; i++)
            {
                packet.ReadInt32("ID", idx, i);
                packet.ReadUInt32("Expiration", idx, i);
                packet.ReadInt32("Charges", idx, i);
                packet.ReadByte("Slot", idx, i);
            }

            if (!censorServerSideInfo)
            {
                packet.ReadPackedGuid128("ItemGUID", idx);
                packet.ReadPackedGuid128("OwnerAccountID", idx);
                packet.ReadInt32("EndTime", idx);
            }

            if (!censorBidInfo)
            {
                packet.ReadPackedGuid128("Bidder", idx);
                packet.ReadInt64("BidAmount", idx);
            }
        }