ReadItemInstance() 공개 정적인 메소드

public static ReadItemInstance ( WowPacketParser.Misc.Packet packet ) : int
packet WowPacketParser.Misc.Packet
리턴 int
예제 #1
0
        public static void HandleDisplayToast610(Packet packet)
        {
            packet.ReadInt32("Quantity");
            packet.ReadByte("DisplayToastMethod");
            packet.ReadBit("Mailed");
            var type = packet.ReadBits("Type", 2);

            if (type == 0)
            {
                packet.ReadBit("BonusRoll");
                ItemHandler.ReadItemInstance(packet);
                packet.ReadInt32("SpecializationID");
                packet.ReadInt32("ItemQuantity?");
            }

            if (type == 2)
            {
                packet.ReadInt32("CurrencyID");
            }
        }
예제 #2
0
        public static void HandleVoidStorageTransferChanges(Packet packet)
        {
            var bits32 = packet.ReadBits("AddedItemsCount", 4);
            var bits16 = packet.ReadBits("RemovedItemsCount", 4);

            // AddedItems
            for (int i = 0; i < bits32; i++)
            {
                packet.ReadPackedGuid128("AddedItemsGuid", i);
                packet.ReadPackedGuid128("Creator", i);
                packet.ReadInt32("Slot", i);

                ItemHandler.ReadItemInstance(packet, i);
            }

            // RemovedItems
            for (int i = 0; i < bits16; i++)
            {
                packet.ReadPackedGuid128("RemovedItemsGuid", i);
            }
        }
예제 #3
0
        public static void HandleVendorInventoryList(Packet packet)
        {
            uint entry = packet.ReadPackedGuid128("VendorGUID").GetEntry();

            packet.ReadByte("Reason");
            int count = packet.ReadInt32("VendorItems");

            for (int i = 0; i < count; ++i)
            {
                NpcVendor vendor = new NpcVendor
                {
                    Entry = entry,
                    Slot  = packet.ReadInt32("Muid", i),
                    Type  = (uint)packet.ReadInt32("Type", i),
                    Item  = ItemHandler.ReadItemInstance(packet, i)
                };

                int maxCount = packet.ReadInt32("Quantity", i);
                packet.ReadInt32("Price", i);
                packet.ReadInt32("Durability", i);
                int buyCount = packet.ReadInt32("StackCount", i);
                vendor.ExtendedCost      = packet.ReadUInt32("ExtendedCostID", i);
                vendor.PlayerConditionID = packet.ReadUInt32("PlayerConditionFailed", i);

                packet.ResetBitReader();

                vendor.IgnoreFiltering = packet.ReadBit("DoNotFilterOnVendor", i);

                vendor.MaxCount = maxCount == -1 ? 0 : (uint)maxCount; // TDB
                if (vendor.Type == 2)
                {
                    vendor.MaxCount = (uint)buyCount;
                }

                Storage.NpcVendors.Add(vendor, packet.TimeSpan);
            }
        }
예제 #4
0
        public static void ReadMailAttachedItem(Packet packet, params object[] idx)
        {
            packet.ReadByte("Position", idx);
            packet.ReadInt32("AttachID", idx);

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

            for (var k = 0; k < 8; ++k)
            {
                packet.ReadInt32("Enchant", idx, k);
                packet.ReadInt32("Duration", idx, k);
                packet.ReadInt32("Charges", idx, k);
            }

            packet.ReadInt32("Count", idx);
            packet.ReadInt32("Charges", idx);
            packet.ReadInt32("MaxDurability", idx);
            packet.ReadInt32("Durability", idx);

            packet.ResetBitReader();

            packet.ReadBit("Unlocked", idx);
        }
예제 #5
0
 public static void ReadClientAuctionBidderNotification(Packet packet, params object[] idx)
 {
     packet.ReadInt32 <ItemId>("AuctionItemID", idx);
     packet.ReadPackedGuid128("Bidder", idx);
     ItemHandler.ReadItemInstance(packet, idx, "Item");
 }
예제 #6
0
 public static void ReadClientAuctionOwnerNotification(Packet packet, params object[] idx)
 {
     packet.ReadInt32 <ItemId>("AuctionItemID", idx);
     packet.ReadUInt64("BidAmount", idx);
     ItemHandler.ReadItemInstance(packet, idx, "Item");
 }
예제 #7
0
 public static void HandleBlackMarketBidOnItemResult(Packet packet)
 {
     packet.ReadInt32("MarketID");
     ItemHandler.ReadItemInstance(packet);
     packet.ReadInt32("Result");
 }
예제 #8
0
 public static void HandleBlackMarketOutbidOrWon(Packet packet)
 {
     packet.ReadInt32("MarketID");
     ItemHandler.ReadItemInstance(packet);
     packet.ReadInt32("RandomPropertiesID");
 }
예제 #9
0
 public static void ReadPlayerChoiceResponseRewardEntry(Packet packet, params object[] indexes)
 {
     ItemHandler.ReadItemInstance(packet, indexes);
     packet.ReadInt32("Quantity", indexes);
 }
예제 #10
0
 public static void HandleDisenchantCredit(Packet packet)
 {
     packet.ReadPackedGuid128("Disenchanter");
     ItemHandler.ReadItemInstance(packet);
 }