コード例 #1
0
 public static void HandleGuildDemote(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         packet.ReadToEnd();
     }
 }
コード例 #2
0
 public static void HandleAutoStoreLootItem(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         packet.ReadToEnd();
     }
 }
コード例 #3
0
 public static void HandleAttackerStateUpdate(Packet packet)
 {
     if (packet.Direction == Direction.ServerToClient)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : CMSG_???");
         packet.ReadToEnd();
     }
 }
コード例 #4
0
 public static void HandleSendUnlearnSpells(Packet packet)
 {
     if (packet.Direction == Direction.ServerToClient)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : CMSG_GROUP_UNINVITE_GUID");
         packet.ReadToEnd();
     }
 }
コード例 #5
0
 public static void HandleClientChatMessageYell(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
         packet.ReadToEnd();
     }
 }
コード例 #6
0
        public static void HandleAutoEquipItem(Packet packet)
        {
            packet.ReadByte("Slot");
            packet.ReadSByte("Bag");

            packet.ReadToEnd();
        }
コード例 #7
0
 public static void HandleServerAddonInfo(Packet packet)
 {
     var BannedAddonsCount = packet.ReadBits("Banned Addons Count", 18);
     var AddonsCount = packet.ReadBits("Addons Count", 23);
     uint[,] AddonsInfo = new uint[AddonsCount, 4];
     packet.ReadToEnd();
 }
コード例 #8
0
        public static void HandleServerGameShopQueryresponse(Packet packet)
        {
            /*var count36 = packet.ReadBits("count36", 19);
            var count16 = packet.ReadBits("count16", 19);
            var count44 = new uint[count16];
            var unk5312 = new bool[count16];
            for (var i = 0; i < count16; i++)
            {
                packet.ReadBits("unk60", 2);
                count44[i] = packet.ReadBits("unk44", 20);
                for (var j = 0; j < count44[i]; j++)
                {
                    packet.ReadBits("unk276", 10, i, j); // 69*4
                    packet.ReadBits("unk4380", 13, i, j); // 1095*4
                    packet.ReadBit("unk156", i, j);
                    packet.ReadBit("unk148", i, j);
                    packet.ReadBit("unk164", i, j);
                    packet.ReadBit("unk5296", i, j);
                    packet.ReadBits("unk2328", 10, i, j);
                }
                unk5312[i] = packet.ReadBit("unk5312", i);
                if (unk5312[i])
                    packet.ReadBits("unk5308", 4, i);

            }*/
            packet.ReadToEnd();
        }
コード例 #9
0
        public static void HandleQuestPoiQuery(Packet packet)
        {
            var count = packet.ReadUInt32("Count");

            for (var i = 0; i < count; i++) //for (var i = 0; i < 50; i++)
                packet.ReadInt32<QuestId>("Quest ID", i);

            packet.ReadToEnd(); // Hack
        }
コード例 #10
0
        public static void HandleServerAddonsList(Packet packet)
        {
            // This packet requires _addonCount from CMSG_AUTH_SESSION to be parsed.
            if (_addonCount == -1)
            {
                packet.WriteLine("CMSG_AUTH_SESSION was not received - cannot successfully parse this packet.");
                packet.ReadToEnd();
                return;
            }

            for (var i = 0; i < _addonCount; i++)
            {
                packet.ReadByte("Addon State", i);

                var sendCrc = packet.ReadBoolean("Use CRC", i);

                if (sendCrc)
                {
                    var usePublicKey = packet.ReadBoolean("Use Public Key", i);

                    if (usePublicKey)
                    {
                        var pubKey = packet.ReadChars(256);
                        packet.Write("[{0}] Public Key: ", i);

                        foreach (var t in pubKey)
                            packet.Write(t.ToString(CultureInfo.InvariantCulture));
                    }

                    packet.ReadInt32("Unk Int32", i);
                }

                if (packet.ReadBoolean("Use URL File", i))
                    packet.ReadCString("Addon URL File", i);
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
            {
                var bannedCount = packet.ReadInt32("Banned Addons Count");

                for (var i = 0; i < bannedCount; i++)
                {
                    packet.ReadInt32("ID", i);

                    var unkStr2 = packet.ReadBytes(16);
                    packet.WriteLine("[{0}] Unk Hash 1: {1}", i, Utilities.ByteArrayToHexString(unkStr2));

                    var unkStr3 = packet.ReadBytes(16);
                    packet.WriteLine("[{0}] Unk Hash 2: {1}", i, Utilities.ByteArrayToHexString(unkStr3));

                    packet.ReadInt32("Unk Int32 3", i);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
                        packet.ReadInt32("Unk Int32 4", i);
                }
            }
        }
コード例 #11
0
        public static void HandleQuestPoiQuery(Packet packet)
        {
            var count = packet.ReadUInt32("Count");

            for (var i = 0; i < count; i++) //for (var i = 0; i < 50; i++)
                packet.ReadEntry<Int32>(StoreNameType.Quest, "Quest ID", i);

            packet.ReadToEnd(); // Hack
        }
コード例 #12
0
        public static void HandleServerWardenData(Packet packet)
        {
            /*var Size = packet.ReadInt32();
            byte[] WardenDataBuffer = packet.ReadBytes(Size);

            Packet WardenData = new Packet(WardenDataBuffer, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName);

            CoreParsers.WardenHandler.HandleServerWardenData(WardenData);*/
            packet.ReadToEnd();
        }
コード例 #13
0
 public static void HandleForcedReactions(Packet packet)
 {
     var counter = packet.ReadBits("Factions", 6);
     /*for (var i = 0; i < counter; i++)
     {
         packet.ReadUInt32("Faction Id");
         packet.ReadUInt32("Reputation Rank");
     }*/
     packet.ReadToEnd();
 }
コード例 #14
0
 public static void HandleQuestQueryResp(Packet packet)
 {
     if (packet.Direction == Direction.ServerToClient)
     {
         packet.ReadToEnd();
     }
     else
     {
         packet.WriteLine("              : CMSG_NULL_0276");
     }
 }
コード例 #15
0
 public static void HandleChannelJoin434(Packet packet)
 {
     packet.ReadInt32("Channel Id");
     packet.ReadBit("Has Voice");
     packet.ReadBit("Joined by zone update");
     var channelLength = packet.ReadBits(8);
     var passwordLength = packet.ReadBits(8);
     packet.ReadWoWString("Channel Name", channelLength);
     packet.ReadWoWString("Channel Pass", passwordLength);
     packet.ReadToEnd();
 }
コード例 #16
0
        public static void HandleClientWardenData(Packet packet)
        {
            var Size = packet.ReadInt32();
            byte[] WardenDataBuffer = packet.ReadBytes(Size);

            //Packet WardenData = new Packet(WardenDataBuffer, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName);

            //CoreParsers.WardenHandler.HandleClientWardenData(WardenData);
            packet.AsHex();
            packet.ReadToEnd();
        }
コード例 #17
0
 public static void HandleTimeSyncResp(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         packet.ReadUInt32("Counter");
         packet.ReadUInt32("Client Ticks");
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         packet.ReadToEnd();
     }
 }
コード例 #18
0
 public static void HandleMailDelete(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         //packet.ReadGuid("Mailbox GUID");
         packet.ReadUInt32("Template Id");
         packet.ReadUInt32("Mail Id");
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
         packet.ReadToEnd();
     }
 }
コード例 #19
0
 public static void HandleGuildFinderBrowse(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         packet.ReadEnum<GuildFinderOptionsRoles>("Class Roles", TypeCode.UInt32);
         packet.ReadEnum<GuildFinderOptionsAvailability>("Availability", TypeCode.UInt32);
         packet.ReadEnum<GuildFinderOptionsInterest>("Guild Interests", TypeCode.UInt32);
         packet.ReadUInt32("Player Level");
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         packet.ReadToEnd();
     }
 }
コード例 #20
0
 public static void HandleLoot510(Packet packet)
 {
     if (packet.Direction == Direction.ClientToServer)
     {
         var guid = packet.StartBitStream(1, 2, 7, 3, 6, 0, 4, 5);
         packet.ParseBitStream(guid, 1, 3, 5, 4, 0, 7, 6, 2);
         packet.WriteGuid("GUID", guid);
     }
     else
     {
         packet.WriteLine("              : SMSG_???");
         //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
         packet.ReadToEnd();
     }
 }
コード例 #21
0
        public static void HandleInitWorldStates(Packet packet)
        {
            packet.ReadEntry<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadEntry<Int32>(StoreNameType.Zone, "Zone Id");
            CurrentAreaId = packet.ReadEntry<Int32>(StoreNameType.Area, "Area Id");

            var numFields = packet.ReadInt16("Field Count");
            //packet.ReadByte("UnkB");
            /*for (var i = 0; i < numFields; i++)
            {
                var val = packet.ReadByte();
                packet.WriteLine("Field: {0} - Value: {1}", i, val);
            }*/
            packet.ReadToEnd();
        }
コード例 #22
0
        public static void HandleServerAddonsList(Packet packet)
        {
            // This packet requires _addonCount from CMSG_AUTH_SESSION to be parsed.
            if (_addonCount == -1)
            {
                packet.AddValue("Error", "CMSG_AUTH_SESSION was not received - cannot successfully parse this packet.");
                packet.ReadToEnd();
                return;
            }

            for (var i = 0; i < _addonCount; i++)
            {
                packet.ReadByte("Addon State", i);

                var sendCrc = packet.ReadBool("Use CRC", i);

                if (sendCrc)
                {
                    var usePublicKey = packet.ReadBool("Use Public Key", i);

                    if (usePublicKey)
                        packet.ReadBytes("Name MD5", 256);

                    packet.ReadInt32("Unk Int32", i);
                }

                if (packet.ReadBool("Use URL File", i))
                    packet.ReadCString("Addon URL File", i);
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
            {
                var bannedCount = packet.ReadInt32("Banned Addons Count");

                for (var i = 0; i < bannedCount; i++)
                {
                    packet.ReadInt32("ID", i);
                    packet.ReadBytes("Name MD5", 16);
                    packet.ReadBytes("Version MD5", 16);
                    packet.ReadTime("Time", i);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
                        packet.ReadInt32("Is banned", i);
                }
            }
        }
コード例 #23
0
        public static void HandleCancelAura(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                packet.ReadEntryWithName<UInt32>(StoreNameType.Spell, "Spell ID");

                packet.ReadBit("Unk");
                var guid = packet.StartBitStream(6, 5, 1, 0, 4, 3, 2, 7);
                packet.ParseBitStream(guid, 3, 2, 1, 0, 4, 7, 5, 6);
                packet.WriteGuid("Guid", guid);
            }
            else
            {
                packet.WriteLine("              : SMSG_???");
                packet.ReadToEnd();
            }
        }
コード例 #24
0
        public static void HandleAutoStoreLootItem547(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                var counter = packet.ReadBits("Count", 23);

                var guid = new byte[counter][];

                for (var i = 0; i < counter; ++i)
                {
                    guid[i] = new byte[8];

                    guid[i][2] = packet.ReadBit();
                    guid[i][1] = packet.ReadBit();
                    guid[i][5] = packet.ReadBit();
                    guid[i][7] = packet.ReadBit();
                    guid[i][4] = packet.ReadBit();
                    guid[i][3] = packet.ReadBit();
                    guid[i][0] = packet.ReadBit();
                    guid[i][6] = packet.ReadBit();
                }

                packet.ResetBitReader();

                for (var i = 0; i < counter; ++i)
                {
                    packet.ReadXORByte(guid[i], 0);
                    packet.ReadXORByte(guid[i], 3);
                    packet.ReadByte("Slot", i);
                    packet.ReadXORByte(guid[i], 7);
                    packet.ReadXORByte(guid[i], 2);
                    packet.ReadXORByte(guid[i], 4);
                    packet.ReadXORByte(guid[i], 1);
                    packet.ReadXORByte(guid[i], 6);
                    packet.ReadXORByte(guid[i], 5);

                    packet.WriteGuid("Lootee GUID", guid[i], i);
                }
            }
            else
            {
                packet.WriteLine("              : SMSG_???");
                //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
                packet.ReadToEnd();
            }
        }
コード例 #25
0
        public static void HandleMailCreate(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                packet.ReadUInt32("Mail Id");

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

                packet.WriteGuid("Guid Target", guid);
            }
            else
            {
                packet.WriteLine("              : SMSG_???");
                //packet.Opcode = (int)Opcode.CMSG_LOOT_MONEY;
                packet.ReadToEnd();
            }
        }
コード例 #26
0
        public static void HandleClientChatMessageWhisper434(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                packet.ReadEnum<ChatMessageType>("Type", TypeCode.UInt32);
                var recvName = packet.ReadBits(10);
                var msgLen = packet.ReadBits(9);

                packet.ReadWoWString("Receivers Name", recvName);
                packet.ReadWoWString("Message", msgLen);
            }
            else
            {
                packet.WriteLine("              : SMSG_???");
                //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
                packet.ReadToEnd();
            }
        }
コード例 #27
0
        public static void HandleAuraUpdate(Packet packet)
        {
            var guid = new byte[8];
            var casterGUID = new byte[8];
            bool notFlagCaster = false;
            guid[3] = packet.ReadBit();
            packet.ReadBit("unk");
            guid[4] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            var aurCount = packet.ReadBits("aurCount", 24);
            guid[7] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            var notRemove = packet.ReadBit("notRemove");

            if (notRemove)
            {
                packet.ReadBit("hasDuration");
                packet.ReadBits("unk1", 22);
                packet.ReadBit("hasMaxDuration");
                notFlagCaster = packet.ReadBit("notFlagCaster");
                packet.ReadBits("effCount", 22);

                if (notFlagCaster)
                     casterGUID = packet.StartBitStream(1, 6, 0, 7, 5, 3, 2, 4);
            }

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

            if (notRemove)
            {
                if (notFlagCaster)
                {
                    packet.ParseBitStream(casterGUID, 2, 5, 6, 7, 0, 1, 4, 3);
                    packet.WriteGuid("Caster Guid", casterGUID);
                }

                packet.ReadUInt32("EffectMask");
            }
            packet.ReadToEnd();
        }
コード例 #28
0
        public static void HandleCompressedMoves(Packet packet)
        {
            var pkt = packet.Inflate(packet.ReadInt32());
            packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
            packet.Writer.WriteLine();

            while (pkt.CanRead())
            {
                var size = pkt.ReadByte();
                var opc = pkt.ReadInt16();
                var data = pkt.ReadBytes(size - 2);

                var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
                Statistics.Total += 1;
                Handler.Parse(newPacket);
            }

            packet.Writer.WriteLine("}");
            packet.ReadToEnd();
        }
コード例 #29
0
        public static void HandleCompressedMoves(Packet packet)
        {
            var pkt = packet.Inflate(packet.ReadInt32());
            packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
            packet.Writer.WriteLine();

            while (pkt.CanRead())
            {
                var size = pkt.ReadByte();
                pkt.GetLength();
                var opc = pkt.ReadInt16();

                size -= 2; // TODO: Should not be needed! Is here because size is by some reason always 2 bits too high
                byte[] input = pkt.ReadBytes(size);
                var newPacket = new Packet(input, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
                Statistics.Total += 1;
                Handler.Parse(newPacket);
            }

            packet.Writer.WriteLine("}");
            packet.ReadToEnd();
        }
コード例 #30
0
        public static void HandleCompressedMoves(Packet packet)
        {
            packet.WriteLine("{"); // To be able to see what is inside this packet.
            packet.WriteLine();

            using (var pkt = packet.Inflate(packet.ReadInt32()))
            {
                while (pkt.CanRead())
                {
                    var size = pkt.ReadByte();
                    var opc = pkt.ReadInt16();
                    var data = pkt.ReadBytes(size - 2);

                    using (var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer, packet.SniffFileInfo))
                    {
                        Handler.Parse(newPacket, true);
                    }
                }
            }

            packet.WriteLine("}");
            packet.ReadToEnd();
        }