public static void HandleBlackMarketItemResult(Packet packet)
        {
            var bit34 = false;

            var bits10 = 0;

            packet.ReadInt32("Int20");
            bits10 = (int)packet.ReadBits(18);

            for (var i = 0; i < bits10; ++i)
            {
                bit34 = packet.ReadBit();
            }

            for (var i = 0; i < bits10; ++i)
            {
                packet.ReadInt32("Item Entry", i);
                packet.ReadInt64("Current Bid", i);
                packet.ReadInt64("Start Price", i);
                packet.ReadInt32("Amount of price raise", i);
                packet.ReadInt32("Auction Id", i);
                packet.ReadInt32("Seller", i);
                packet.ReadInt64("Difference in price", i);
                packet.ReadInt32("Time Left", i);
                packet.ReadInt32("Int9", i);
                packet.ReadInt32("Amount", i);
            }
        }
 public static void HandleAvailableVoiceChannel(Packet packet)
 {
     packet.ReadInt64("Unk Int64 1");
     packet.ReadByte("Channel Type");
     packet.ReadCString("Channel Name");
     packet.ReadInt64("Unk Int64 2");
 }
 public static void HandleBattlePayDistributionAssignToTarget(Packet packet)
 {
     packet.ReadInt32("ClientToken");
     packet.ReadInt64("DistributionID");
     packet.ReadPackedGuid128("TargetCharacter");
     packet.ReadInt32("ProductChoice");
 }
Example #4
1
        public static void Handle41694(Packet packet)
        {
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
                packet.ReadInt32("Unk");

            for (var i = 0; i < count; i++)
                packet.ReadGuid("Unk");

            for (var i = 0; i < count; i++)
            {
                var count2 = packet.ReadInt32("Unk");

                for (var j = 0; j < count2; j++)
                    packet.ReadInt64("Unk");
            }

            for (var i = 0; i < count; i++)
                packet.ReadInt32("Unk");

            for (var i = 0; i < count; i++)
            {
                packet.ReadInt32("Unk");
                packet.ReadInt32("Unk");
            }

            for (var i = 0; i < count; i++)
                packet.ReadInt32("Unk");

            for (var i = 0; i < count; i++)
                packet.WriteLine(packet.ReadPackedTime());
        }
Example #5
1
 public static void HandleDFProposalResponse(Packet packet)
 {
     ReadCliRideTicket(packet);
     packet.ReadInt64("InstanceID");
     packet.ReadInt32("ProposalID");
     packet.ReadBit("Accepted");
 }
        public static void HandleBlackMarketRequestItemsResult(Packet packet)
        {
            var bit34 = false;
            var bits10 = 0;

            packet.ReadInt32("Unk");
            bits10 = (int)packet.ReadBits(18); // item count

            for (var i = 0; i < bits10; ++i)
            {
                bit34 = packet.ReadBit();
            }

            for (var i = 0; i < bits10; ++i)
            {
                packet.ReadInt32("unk1", i);
                packet.ReadInt32("Amount", i); // ?
                packet.ReadInt32("Time Left", i); // ?
                packet.ReadInt32("unk2", i); // Amount of price raise ???
                packet.ReadInt32("Item Entry", i);
                packet.ReadInt64("Start Price", i);
                packet.ReadInt64("Current Bid", i);
                packet.ReadInt64("Difference in price", i); // ?
                packet.ReadInt32("Seller (npc entry)", i);
                packet.ReadInt32("Auction Id", i); // ?
            }
        }
 public static void HandleAddCalendarEventInvite(Packet packet)
 {
     packet.ReadInt64("Event ID");
     packet.ReadInt64("Invite ID");
     packet.ReadCString("Name");
     packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
     packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
 }
Example #8
0
 public static void Handle13438(Packet packet)
 {
     packet.ReadInt64("Unk");
     packet.ReadInt64("Unk");
     packet.ReadInt64("Unk");
     packet.ReadInt64("Unk");
     packet.ReadInt64("Unk");
 }
Example #9
0
        public static void HandleTokenUnk1(Packet packet)
        {
            var count1 = packet.ReadInt32("UnkCount1");
            var count2 = packet.ReadInt32("UnkCount2");

            for (int i = 0; i < count1; i++)
                packet.ReadInt64("UnkInt64_1", i);

            for (int i = 0; i < count2; i++)
                packet.ReadInt64("UnkInt64_2", i);
        }
 public static void HandleCalendarEventInviteAlert(Packet packet)
 {
     packet.ReadInt64("Event ID");
     packet.ReadCString("Title");
     packet.ReadPackedTime("Time");
     packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);
     packet.ReadEnum<CalendarEventType>("Type", TypeCode.Int32);
     packet.ReadEntryWithName<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
     packet.ReadInt64("Invite ID");
     packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
     packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
     packet.ReadPackedGuid("Creator GUID");
     packet.ReadPackedGuid("Sender GUID");
 }
Example #11
0
        public static void HandleGMTicketCaseStatus(Packet packet)
        {
            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_2_20444))
            {
                packet.ReadTime("OldestTicketTime");
                packet.ReadTime("UpdateTime");
            }

            var int24 = packet.ReadInt32("CasesCount");
            for (int i = 0; i < int24; i++)
            {
                packet.ReadInt32("CaseID", i);
                packet.ReadInt32("CaseOpened", i);
                packet.ReadInt32("CaseStatus", i);
                packet.ReadInt16("CfgRealmID", i);
                packet.ReadInt64("CharacterID", i);
                packet.ReadInt32("WaitTimeOverrideMinutes", i);

                packet.ResetBitReader();
                var bits12 = packet.ReadBits(11);
                var bits262 = packet.ReadBits(10);

                packet.ReadWoWString("Url", bits12, i);
                packet.ReadWoWString("WaitTimeOverrideMessage", bits262, i);
            }
        }
Example #12
0
        public static void HandleVendorInventory(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)
                };

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

                vendor.Item = V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, i);
                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);
            }
        }
        public static void HandleCalendarSendEvent(Packet packet)
        {
            packet.ReadByte("EventType");
            packet.ReadPackedGuid128("OwnerGUID");
            packet.ReadInt64("EventID");
            packet.ReadByte("GetEventType");
            packet.ReadInt32("TextureID");
            packet.ReadUInt32("Flags");
            packet.ReadUInt32("Date");
            packet.ReadUInt32("LockDate");
            packet.ReadPackedGuid128("EventGuildID");

            var inviteCount = packet.ReadInt32("InviteCount");

            packet.ResetBitReader();

            var lenEventName = packet.ReadBits(8);
            var lenDescription = packet.ReadBits(11);

            packet.ResetBitReader();

            for (int i = 0; i < inviteCount; i++)
                V6_0_2_19033.Parsers.CalendarHandler.ReadCalendarEventInviteInfo(packet, "Invites", i);

            packet.ReadWoWString("EventName", lenEventName);
            packet.ReadWoWString("Description", lenDescription);
        }
Example #14
0
 public static void HandleGetMailList(Packet packet)
 {
     packet.ReadPackedGuid128("Mailbox");
     var int32 = packet.ReadInt32("Count");
     for (int i = 0; i < int32; i++)
         packet.ReadInt64("LowGuid?");
 }
        public static void HandleBattlePayDeliveryEnded(Packet packet)
        {
            packet.ReadInt64("DistributionID");

            var itemCount = packet.ReadInt32("ItemCount");
            for (int i = 0; i < itemCount; i++)
                ItemHandler.ReadItemInstance(packet, i);
        }
 public static void HandleCalendarEventInviteAlert(Packet packet)
 {
     packet.ReadInt64("Event ID");
     packet.ReadCString("Title");
     packet.ReadPackedTime("Time");
     packet.ReadInt32E<CalendarFlag>("Event Flags");
     packet.ReadInt32E<CalendarEventType>("Type");
     packet.ReadInt32<LFGDungeonId>("Dungeon ID");
     packet.ReadInt64("Invite ID");
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0a_15050))
     {
         packet.ReadGuid("Guild GUID");
     }
     packet.ReadByteE<CalendarEventStatus>("Status");
     packet.ReadByteE<CalendarModerationRank>("Moderation Rank");
     packet.ReadPackedGuid("Creator GUID");
     packet.ReadPackedGuid("Sender GUID");
 }
        public static void HandleAuctionCommandResult(Packet packet)
        {
            var unk32 = !packet.ReadBit("!unk32"); // 32
            var unk16 = !packet.ReadBit("!unk16"); // 16
            var unk24 = !packet.ReadBit("!unk24"); // 24
            var guid = packet.StartBitStream(1, 4, 0, 6, 3, 5, 2, 7);
            packet.ParseBitStream(guid, 3, 0, 7, 1, 4, 6, 5, 2);
            if (unk16)
                packet.ReadInt64("unk16"); // 16
            var error = packet.ReadUInt32E<AuctionHouseError>("Error"); // 44
            var action = packet.ReadUInt32E<AuctionHouseAction>("Action"); // 48

            packet.ReadUInt32("Auction ID"); // 52
            if (unk32)
                packet.ReadInt64("unk32"); // 32
            packet.ReadInt32("unk40"); // 40  =40 if bag

            packet.WriteGuid("Guid", guid);
        }
 public static void HandleCriteriaPlayer(Packet packet)
 {
     packet.ReadInt32("Id");
     packet.ReadInt64("Quantity");
     packet.ReadPackedGuid128("Guid");
     packet.ReadInt32("Flags");
     packet.ReadPackedTime("Date");
     packet.ReadTime("TimeFromStart");
     packet.ReadTime("TimeFromCreate");
 }
Example #19
0
        public static void HandleTokenUnk1(Packet packet)
        {
            var count1 = packet.ReadInt32("DistributionCount1");
            var count2 = packet.ReadInt32("DistributionCount2");

            for (int i = 0; i < count1; i++)
                packet.ReadInt64("DistributionID", i);

            for (int i = 0; i < count2; i++)
                packet.ReadInt64("DistributionID", i);
        }
        public static void HandleBlackMarketBidOnItem(Packet packet)
        {
            var guid2 = new byte[8];

            packet.ReadInt32("Id");
            packet.ReadInt32("Item Entry");
            packet.ReadInt64("Price");

            packet.StartBitStream(guid2, 0, 5, 4, 3, 7, 6, 1, 2);
            packet.ParseBitStream(guid2, 4, 3, 6, 5, 7, 1, 0, 2);
            packet.WriteGuid("Guid2", guid2);
        }
Example #21
0
        public static void HandleComplain(Packet packet)
        {
            var result = packet.ReadByte("ComplaintType");

            ReadComplaintOffender(packet, "Offender");

            switch (result)
            {
                case 0: // Mail
                    packet.ReadInt32("MailID");
                    break;
                case 1: // Chat
                    ReadComplaintChat(packet, "Chat");
                    break;
                case 2: // Calendar
                    // Order guessed
                    packet.ReadInt64("EventGuid");
                    packet.ReadInt64("InviteGuid");
                    break;
            }
        }
        public static void HandleBlackMarketBid(Packet packet)
        {
            var guid2 = new byte[8];

            packet.ReadInt64("Price");
            packet.ReadInt32("Item Entry");
            packet.ReadInt32("Int20");

            packet.StartBitStream(guid2, 4, 2, 1, 0, 6, 7, 3, 5);
            packet.ParseBitStream(guid2, 4, 0, 3, 1, 7, 5, 2, 6);
            packet.WriteGuid("Guid2", guid2);
        }
        public static void HandleAuctionCommandResult(Packet packet)
        {
            packet.ReadUInt32("Auction ID");
            var action = packet.ReadEnum<AuctionHouseAction>("Action", TypeCode.UInt32);
            var error = packet.ReadEnum<AuctionHouseError>("Error", TypeCode.UInt32);

            if (error == AuctionHouseError.Inventory)
                packet.ReadInt32("Error Inventory Int32");

            switch (error)
            {
                case AuctionHouseError.Ok:
                    if (action == AuctionHouseAction.Bid)
                        packet.ReadInt64("Unknown Bid Int64");
                    break;
                case AuctionHouseError.HigherBid:
                    packet.ReadInt64("Unknown HigherBid Int64");
                    packet.ReadInt32("Unknown HigherBid Int32");
                    packet.ReadInt32("Unknown HigherBid Int32");
                    break;
            }
        }
Example #24
0
        public static void HandleTradeUpdated(Packet packet)
        {
            packet.ReadByte("WhichPlayer");

            packet.ReadInt32("ID");
            packet.ReadInt32("CurrentStateIndex");
            packet.ReadInt32("ClientStateIndex");

            packet.ReadInt64("Gold");

            // Order guessed
            packet.ReadInt32("CurrencyType");
            packet.ReadInt32("CurrencyQuantity");
            packet.ReadInt32("ProposedEnchantment");

            var count = packet.ReadInt32("ItemCount");

            for (int i = 0; i < count; i++)
            {
                packet.ReadByte("Slot", i);
                packet.ReadInt32("EntryID", i);
                packet.ReadInt32("StackCount", i);

                packet.ReadPackedGuid128("GiftCreator", i);

                packet.ResetBitReader();

                var bit32 = packet.ReadBit("HasUnwrapped", i);
                if (bit32)
                {
                    ItemHandler.ReadItemInstance(packet, i);

                    packet.ReadInt32("EnchantID", i);
                    packet.ReadInt32("OnUseEnchantmentID", i);

                    for (int j = 0; j < 3; j++)
                        packet.ReadInt32("SocketEnchant", i, j);

                    packet.ReadPackedGuid128("Creator", i);

                    packet.ReadInt32("MaxDurability", i);
                    packet.ReadInt32("Durability", i);
                    packet.ReadInt32("Charges", i);

                    packet.ResetBitReader();

                    packet.ReadBit("Lock", i);
                }
            }
        }
 public static void HandleBattlePayPurchaseUpdate(Packet packet)
 {
     var battlePayPurchaseCount = packet.ReadBits("BattlePayPurchaseCount", 19);
     var len = new uint[battlePayPurchaseCount];
     for (var i = 0; i < battlePayPurchaseCount; i++)
         len[i] = packet.ReadBits(8);
     for (var i = 0; i < battlePayPurchaseCount; i++)
     {
         packet.ReadInt32("unk68", i); // 68
         packet.ReadInt64("PurchaseID", i); // 20
         packet.ReadInt32("unk84", i); // 84
         packet.ReadInt32("unk52", i); // 52
         packet.ReadWoWString("WalletName", len[i], i);
     }
 }
Example #26
0
 public static void HandleClientChatMessageEmote(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         var len = packet.ReadBits(8);
         packet.ReadWoWString("Message", len);
     }
     else
     {
         packet.WriteLine("              : SMSG_UNK_103E");
         packet.ReadInt32("Int32");
         packet.ReadInt32("Int28");
         packet.ReadInt32("Int24");
         packet.ReadInt64("QW16");
     }
 }
Example #27
0
 public static void HandleGameStoreIngameBuyFailed(Packet packet)
 {
     var count = packet.ReadBits("count", 19);
     var unk44 = new uint[count];
     for (var i = 0; i < count; i++)
         unk44[i] = packet.ReadBits("unk44", 8, i);
     for (var i = 0; i < count; i++)
     {
         packet.ReadInt64("unk24", i);
         packet.ReadInt32("unk54", i);
         var unk88 = packet.ReadInt32("unk88", i);
         packet.ReadWoWString("str", unk88, i);
         packet.ReadInt32("unk72", i);
     }
     packet.ReadInt32("unk16");
 }
        public static void HandleGameStoreAuthBuyFailed(Packet packet)
        {
            var bits10 = packet.ReadBits(19);

            var bits0 = new uint[bits10];

            for (var i = 0; i < bits10; ++i)
                bits0[i] = packet.ReadBits(8);

            for (var i = 0; i < bits10; ++i)
            {
                packet.ReadInt32("IntED", i);
                packet.ReadWoWString("StringED", bits0[i], i);
                packet.ReadInt64("IntED", i);
                packet.ReadInt32("IntED", i);
                packet.ReadInt32("IntED", i);
            }
        }
 public static void HandleCalendarEventInviteAlert(Packet packet)
 {
     packet.ReadInt64("Event ID");
     packet.ReadCString("Title");
     packet.ReadPackedTime("Time");
     packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);
     packet.ReadEnum<CalendarEventType>("Type", TypeCode.Int32);
     packet.ReadEntry<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
     packet.ReadInt64("Invite ID");
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0a_15050))
     {
         packet.ReadGuid("Guild GUID");
     }
     packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
     packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
     packet.ReadPackedGuid("Creator GUID");
     packet.ReadPackedGuid("Sender GUID");
 }
        public static void HandleAuthSession434(Packet packet)
        {
            var sha = new byte[20];
            packet.ReadUInt32("UInt32 1");
            packet.ReadUInt32("UInt32 2");
            packet.ReadByte("Unk Byte");
            sha[10] = packet.ReadByte();
            sha[18] = packet.ReadByte();
            sha[12] = packet.ReadByte();
            sha[5] = packet.ReadByte();
            packet.ReadInt64("Int64");
            sha[15] = packet.ReadByte();
            sha[9] = packet.ReadByte();
            sha[19] = packet.ReadByte();
            sha[4] = packet.ReadByte();
            sha[7] = packet.ReadByte();
            sha[16] = packet.ReadByte();
            sha[3] = packet.ReadByte();
            packet.ReadEnum<ClientVersionBuild>("Client Build", TypeCode.Int16);
            sha[8] = packet.ReadByte();
            packet.ReadUInt32("UInt32 3");
            packet.ReadByte("Unk Byte");
            sha[17] = packet.ReadByte();
            sha[6] = packet.ReadByte();
            sha[0] = packet.ReadByte();
            sha[1] = packet.ReadByte();
            sha[11] = packet.ReadByte();
            packet.ReadUInt32("Client seed");
            sha[2] = packet.ReadByte();
            packet.ReadUInt32("UInt32 4");
            sha[14] = packet.ReadByte();
            sha[13] = packet.ReadByte();

            using (var addons = new Packet(packet.ReadBytes(packet.ReadInt32()), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName))
            {
                var pkt2 = addons;
                CoreParsers.AddonHandler.ReadClientAddonsList(ref pkt2);
            }

            packet.ReadBit("Unk bit");
            var size = (int)packet.ReadBits(12);
            packet.WriteLine("Account name: {0}", Encoding.UTF8.GetString(packet.ReadBytes(size)));
            packet.WriteLine("Proof SHA-1 Hash: " + Utilities.ByteArrayToHexString(sha));
        }