public static void HandleAuctionListItems(Packet packet)
        {
            packet.ReadInt32("Offset");
            packet.ReadPackedGuid128("Auctioneer");

            packet.ReadByte("MinLevel");
            packet.ReadByte("MaxLevel");
            packet.ReadInt32("InvType");
            packet.ReadInt32("ItemClass");
            packet.ReadInt32("ItemSubclass");
            packet.ReadInt32("Quality");
            var sort = packet.ReadByte("SortCount");

            packet.ResetBitReader();

            var len = packet.ReadBits(8);
            packet.ReadWoWString("Name", len);

            packet.ReadBit("OnlyUsable");
            packet.ReadBit("ExactMatch");

            var size = packet.ReadInt32("DataSize");
            var data = packet.ReadBytes(size);
            var sorts = new Packet(data, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName);
            for (var i = 0; i < sort; ++i)
            {
                sorts.ReadByte("UnkByte1", i);
                sorts.ReadByte("UnkByte2", i);
            }
        }
Example #2
1
 public static void HandleQuestCompleteQuest(Packet packet)
 {
     packet.ReadGuid("GUID");
     packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest ID");
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623))
         packet.ReadByte("Unk byte");
 }
 public static void HandleAchievementEarned(Packet packet)
 {
     packet.ReadPackedGuid("Player GUID");
     packet.ReadInt32("Achievement");
     packet.ReadPackedTime("Time");
     packet.ReadInt32("Unk Int32");
 }
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 HandleTradeGold(Packet packet)
 {
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6_13596)) // Need correct version
         packet.ReadUInt64("Gold");
     else
         packet.ReadUInt32("Gold");
 }
 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 HandleGameTimeUpdate(Packet packet)
 {
     packet.ReadPackedTime("ServerTime");
     packet.ReadPackedTime("GameTime");
     packet.ReadInt32("ServerTimeHolidayOffset");
     packet.ReadInt32("GameTimeHolidayOffset");
 }
        public static void HandleDestroyObject(Packet packet)
        {
            if (packet.Direction == Direction.ServerToClient)
            {
                var guid = new byte[8];

                guid[3] = packet.ReadBit();
                guid[2] = packet.ReadBit();
                guid[4] = packet.ReadBit();
                guid[1] = packet.ReadBit();

                packet.ReadBit("Despawn Animation");

                guid[7] = packet.ReadBit();
                guid[0] = packet.ReadBit();
                guid[6] = packet.ReadBit();
                guid[5] = packet.ReadBit();

                packet.ParseBitStream(guid, 0, 4, 7, 2, 6, 3, 1, 5);

                packet.WriteGuid("Object Guid", guid);
            }
            else
            {
                packet.WriteLine("              : CMSG_PVP_LOG_DATA");
            }
        }
Example #9
1
 public static void HandleCompressedUpdateObject(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         HandleUpdateObject(packet2);
     }
 }
Example #10
1
        public static void HandleGuildBankActivate(Packet packet)
        {
            packet.ReadPackedGuid128("Banker");

            packet.ResetBitReader();
            packet.ReadBit("FullUpdate");
        }
Example #11
1
 public static void HandleGuildPartyStateResponse(Packet packet)
 {
     packet.ReadSingle("Guild XP multiplier");
     packet.ReadInt32("Int10");
     packet.ReadInt32("Int14");
     packet.ReadBit("Is guild group");
 }
        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 HandleBattlePayDistributionAssignToTarget(Packet packet)
 {
     packet.ReadInt32("ClientToken");
     packet.ReadInt64("DistributionID");
     packet.ReadPackedGuid128("TargetCharacter");
     packet.ReadInt32("ProductChoice");
 }
        public static void HandleClientEnterWorld(Packet packet)
        {
            var mapId = packet.ReadEntry<Int32>(StoreNameType.Map, "Map");
            packet.ReadBit("Loading");

            packet.AddSniffData(StoreNameType.Map, mapId, "LOAD_SCREEN");
        }
        public static void HandlePetNameQueryResponse(Packet packet)
        {
            var hasData = packet.ReadBit();
            if (!hasData)
            {
                packet.ReadUInt64("Pet number");
                return;
            }

            packet.ReadBit("Declined");

            const int maxDeclinedNameCases = 5;
            var declinedNameLen = new int[maxDeclinedNameCases];
            for (var i = 0; i < maxDeclinedNameCases; ++i)
                declinedNameLen[i] = (int)packet.ReadBits(7);

            var len = packet.ReadBits(8);

            for (var i = 0; i < maxDeclinedNameCases; ++i)
                if (declinedNameLen[i] != 0)
                    packet.ReadWoWString("Declined name", declinedNameLen[i], i);

            var petName = packet.ReadWoWString("Pet name", len);
            packet.ReadTime("Time");
            var number = packet.ReadUInt64("Pet number");

            var guidArray = (from pair in StoreGetters.NameDict where Equals(pair.Value, number) select pair.Key).ToList();
            foreach (var guid in guidArray)
                StoreGetters.NameDict[guid] = petName;
        }
Example #16
1
        public static void HandleDestroyObject(Packet packet)
        {
            packet.ReadGuid("GUID");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
                packet.ReadBoolean("Despawn Animation");
        }
Example #17
1
        public static void HandleAttackStartStop(Packet packet)
        {
            packet.ReadPackedGuid128("Attacker Guid");
            packet.ReadPackedGuid128("Victim Guid");

            packet.ReadBit("NowDead");
        }
        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<ItemProtoFlags>("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("Total item count");
            packet.ReadUInt32("Desired delay time");
        }
 public static void HandleArenaTeamCommandResult(Packet packet)
 {
     packet.ReadUInt32("Action"); // FIXME: Use enum
     packet.ReadCString("Team Name");
     packet.ReadCString("Player Name");
     packet.ReadUInt32("ErrorId"); // FIXME: Use enum
 }
        public static void HandleAddCalendarEvent(Packet packet)
        {
            packet.ReadCString("Title");
            packet.ReadCString("Description");
            packet.ReadEnum<CalendarEventType>("Event Type", TypeCode.Byte);
            packet.ReadEnum<CalendarRepeatType>("Repeat Type", TypeCode.Byte);
            packet.ReadInt32("Max Invites");
            packet.ReadEntryWithName<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
            packet.ReadPackedTime("Event Time");
            packet.ReadPackedTime("Unk PackedTime");

            var flags = packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);

            if ((flags & CalendarFlag.GuildAnnouncement) != 0)
                return;

            var count = packet.ReadInt32("Invite Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadPackedGuid("Creator GUID");
                packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
                packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
            }
        }
Example #21
1
 public static void Handle13516(Packet packet)
 {
     packet.ReadByte("Unk");
     packet.ReadInt32("Unk");
     packet.ReadSingle("Unk");
     packet.ReadInt32("Unk");
 }
 public static void HandleCalendarCommandResult(Packet packet)
 {
     packet.ReadInt32("UnkInt1");
     packet.ReadCString("UnkString1");
     packet.ReadCString("Param 1"); // if %s is used in the error message
     packet.ReadEnum<CalendarError>("Error", TypeCode.Int32);
 }
Example #23
1
 public static void HandleClearTradeItem(Packet packet)
 {
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6_13596) && ClientVersion.RemovedInVersion(ClientVersionBuild.V4_3_4_15595)) // Need correct versions
         packet.ReadInt32("Slot");
     else
         packet.ReadByte("Slot");
 }
Example #24
1
 public static void HandleActivateTaxiExpress(Packet packet)
 {
     packet.ReadGuid("GUID");
     var count = packet.ReadUInt32("Node Count");
     for (var i = 0; i < count; ++i)
         packet.ReadUInt32("Node ID", i);
 }
 public static void HandleGuildFinderBrowse(Packet packet)
 {
     packet.ReadEnum<GuildFinderOptionsRoles>("Class Roles", TypeCode.UInt32);
     packet.ReadEnum<GuildFinderOptionsAvailability>("Availability", TypeCode.UInt32);
     packet.ReadEnum<GuildFinderOptionsInterest>("Guild Interests", TypeCode.UInt32);
     packet.ReadUInt32("Player Level");
 }
 public static void HandleBattlefieldStatus_Failed(Packet packet)
 {
     LfgHandler.ReadCliRideTicket(packet);
     packet.ReadInt64("QueueID");
     packet.ReadInt32("Reason");
     packet.ReadPackedGuid128("ClientID");
 }
Example #27
1
 public static void HandleDFProposalResponse(Packet packet)
 {
     ReadCliRideTicket(packet);
     packet.ReadInt64("InstanceID");
     packet.ReadInt32("ProposalID");
     packet.ReadBit("Accepted");
 }
Example #28
1
        public static void HandleGuildAchievementData(Packet packet)
        {
            var count = packet.ReadBits("Criteria count", 20);

            var guid = new byte[count][];

            for (var i = 0; i < count; ++i)
            {
                guid[i] = new byte[8];
                packet.StartBitStream(guid[i], 3, 5, 4, 7, 2, 1, 0, 6);
            }

            for (var i = 0; i < count; ++i)
            {
                packet.ReadXORByte(guid[i], 2);
                packet.ReadXORByte(guid[i], 7);
                packet.ReadInt32("Unk 1", i);
                packet.ReadXORByte(guid[i], 5);
                packet.ReadXORByte(guid[i], 3);
                packet.ReadXORByte(guid[i], 1);
                packet.ReadInt32<AchievementId>("Achievement Id", i);
                packet.ReadXORByte(guid[i], 6);
                packet.ReadInt32("Unk 2", i);
                packet.ReadXORByte(guid[i], 4);
                packet.ReadXORByte(guid[i], 0);
                packet.ReadPackedTime("Time", i);
                packet.WriteGuid("Guid", guid[i], i);
            }
        }
        public static void HandleAllAchievementData422(Packet packet)
        {
            var count1 = packet.ReadUInt32("Count1");
            for (var i = 0; i < count1; ++i)
                packet.ReadBits("Flag", 2, 0, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadUInt64("Counter", 0, i);

            var count2 = packet.ReadUInt32("Count2");
            for (var i = 0; i < count2; ++i)
                packet.ReadPackedTime("Achievement Time", 1, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadGuid("Player GUID", 0, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadPackedTime("Criteria Time", 0, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadUInt32("Timer 1", 0, i);

            for (var i = 0; i < count2; ++i)
                packet.ReadUInt32("Achievement Id", 1, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadUInt32("Criteria Id", 0, i);

            for (var i = 0; i < count1; ++i)
                packet.ReadUInt32("Timer 2", 0, i);
        }
        public static void HandleAuctionClosedNotification(Packet packet)
        {
            ReadClientAuctionOwnerNotification(packet, "Info");

            packet.ReadSingle("ProceedsMailDelay");
            packet.ReadBit("Sold");
        }