public static void HandleAuctionBidderNotification(Packet packet)
 {
     packet.ReadUInt32("Auction House ID");
     packet.ReadUInt32("Auction ID");
     packet.ReadGuid("Bidder GUID");
     packet.ReadValue("Bid", _auctionSize);
     packet.ReadValue("Diff", _auctionSize);
     packet.ReadUInt32<ItemId>("Item Entry");
     packet.ReadUInt32("Unk UInt32 1");
 }
 public static void HandleAuctionBidderNotification(Packet packet)
 {
     packet.ReadUInt32("Auction House ID");
     packet.ReadUInt32("Auction ID");
     packet.ReadGuid("Bidder GUID");
     packet.ReadValue("Bid", _auctionSize);
     packet.ReadValue("Diff", _auctionSize);
     packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Entry");
     packet.ReadUInt32("Unk UInt32 1");
 }
        public static void HandleAuctionCommandResult(Packet packet)
        {
            packet.ReadUInt32("Auction ID");
            var action = packet.ReadUInt32E<AuctionHouseAction>("Action");
            var error = packet.ReadUInt32E<AuctionHouseError>("Error");

            if (error == AuctionHouseError.Inventory)
                packet.ReadUInt32E<InventoryResult>("Equip Error");

            switch (error)
            {
                case AuctionHouseError.Ok:
                    if (action == AuctionHouseAction.Bid)
                        packet.ReadValue("Diff", _auctionSize);
                    break;
                case AuctionHouseError.HigherBid:
                    packet.ReadGuid("Bidder");
                    packet.ReadValue("Bid", _auctionSize);
                    packet.ReadValue("Diff", _auctionSize);
                    break;
            }
        }
        public static void HandleAuctionPlaceBid(Packet packet)
        {
            packet.ReadGuid("Auctioneer GUID");
            packet.ReadUInt32("Auction Id");

            // I think Blizz got this wrong. Auction Id should be 64 on 4.x, not price.
            packet.ReadValue("Price", _auctionSize);
        }
 public static void HandleAuctionOwnerNotification(Packet packet)
 {
     packet.ReadUInt32("Auction ID");
     packet.ReadValue("Bid", _auctionSize);
     packet.ReadValue("Diff", _auctionSize);
     packet.ReadGuid("Bidder GUID");
     packet.ReadUInt32<ItemId>("Item Entry");
     packet.ReadUInt32("Unk UInt32 4");
     packet.ReadSingle("Unk float 5");
 }
        public static void HandleAuctionListItemsResult(Packet packet)
        {
            var count = packet.ReadUInt32("Count");
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Auction Id", i);
                packet.ReadUInt32<ItemId>("Item Entry", i);

                int enchantmentCount = ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0_15005) ? 10 : ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545) ? 9 : ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) ? 7 : 6;
                for (var j = 0; j < enchantmentCount; ++j)
                {
                    packet.ReadUInt32("Item Enchantment ID", i, j);
                    packet.ReadUInt32("Item Enchantment Duration", i, j);
                    packet.ReadUInt32("Item Enchantment Charges", i, j);
                }

                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadUInt32("Item Suffix", i);
                packet.ReadUInt32("Item Count", i);
                packet.ReadInt32("Item Spell Charges", i);
                //packet.ReadUInt32E<ItemProtoFlags>("Item Flags", i);
                packet.ReadUInt32("Unk UInt32 1", i);
                packet.ReadGuid("Owner", i);
                packet.ReadValue("Start Bid", _auctionSize, i);
                packet.ReadValue("Out Bid", _auctionSize, i);
                packet.ReadValue("Buyout ", _auctionSize, i);
                packet.ReadUInt32("Time Left", i);
                packet.ReadGuid("Bidder", i);
                packet.ReadValue("Bid", _auctionSize, i);
            }

            packet.ReadUInt32("Total item count");
            packet.ReadUInt32("Desired delay time");
        }
        public static void HandleAuctionListBidderResult(Packet packet)
        {
            var count = packet.ReadUInt32("Count");
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Auction Id", i);
                packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Entry", i);

                int enchantmentCount = ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0_15005) ? 10 : ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545) ? 9 : ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) ? 7 : 6;
                for (var j = 0; j < enchantmentCount; ++j)
                {
                    packet.ReadUInt32("Item Enchantment ID", i, j);
                    packet.ReadUInt32("Item Enchantment Duration", i, j);
                    packet.ReadUInt32("Item Enchantment Charges", i, j);
                }

                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadUInt32("Item Suffix", i);
                packet.ReadUInt32("Item Count", i);
                packet.ReadInt32("Item Spell Charges", i);
                //packet.ReadEnum<ItemFlag>("Item Flags", TypeCode.UInt32, i);
                packet.ReadUInt32("Unk UInt32 1", i);
                packet.ReadGuid("Owner", i);
                packet.ReadValue("Start Bid", _auctionSize, i);
                packet.ReadValue("Out Bid", _auctionSize, i);
                packet.ReadValue("Buyout ", _auctionSize, i);
                packet.ReadUInt32("Time Left", i);
                packet.ReadGuid("Bidder", i);
                packet.ReadValue("Bid", _auctionSize, i);
            }

            packet.ReadUInt32("Own Count");
            packet.ReadUInt32("Unk UInt32 1");
        }
 public static void HandleAuctionOwnerNotification(Packet packet)
 {
     packet.ReadUInt32("Auction ID");
     packet.ReadValue("Bid", _auctionSize);
     packet.ReadValue("Unk 1", _auctionSize);
     packet.ReadUInt64("Unk UInt64 2");
     packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Entry");
     packet.ReadUInt32("Unk UInt32 4");
     packet.ReadSingle("Unk float 5");
 }
        public static void HandleAuctionListBidderItemsResult(Packet packet)
        {
            var count = packet.ReadUInt32("Count");
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Auction Id", i);
                packet.ReadUInt32<ItemId>("Item Entry", i);

                int enchantmentCount = 8;
                for (var j = 0; j < enchantmentCount; ++j)
                {
                    packet.ReadUInt32("Item Enchantment ID", i, j);
                    packet.ReadUInt32("Item Enchantment Duration", i, j);
                    packet.ReadUInt32("Item Enchantment Charges", i, j);
                }

                packet.ReadUInt32("Unk UInt32 1", i);
                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadUInt32("Item Suffix", i);
                packet.ReadUInt32("Item Count", i);
                packet.ReadInt32("Item Spell Charges", i);
                packet.ReadUInt32E<ItemProtoFlags>("Item Flags", i);
                packet.ReadGuid("Owner", i);
                packet.ReadValue("Start Bid", TypeCode.UInt64, i);
                packet.ReadValue("Out Bid", TypeCode.UInt64, i);
                packet.ReadValue("Buyout ", TypeCode.UInt64, i);
                packet.ReadUInt32("Time Left", i);
                packet.ReadGuid("Bidder", i);
                packet.ReadValue("Bid", TypeCode.UInt64, i);
            }

            packet.ReadUInt32("Total item count");
            packet.ReadUInt32("Desired delay time");
        }