当前位置: 首页>>代码示例>>C#>>正文


C# Packet.Inflate方法代码示例

本文整理汇总了C#中WowPacketParser.Misc.Packet.Inflate方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.Inflate方法的具体用法?C# Packet.Inflate怎么用?C# Packet.Inflate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WowPacketParser.Misc.Packet的用法示例。


在下文中一共展示了Packet.Inflate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleCompressedUpdateObject

 public static void HandleCompressedUpdateObject(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         HandleUpdateObject(packet2);
     }
 }
开发者ID:Asdcrew,项目名称:WowPacketParser,代码行数:7,代码来源:UpdateHandler.cs

示例2: HandleCompressedGuildRoster

 public static void HandleCompressedGuildRoster(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         HandleGuildRoster422(packet2);
     }
 }
开发者ID:Asdcrew,项目名称:WowPacketParser,代码行数:7,代码来源:GuildHandler.cs

示例3: HandleServerUpdateAccountData

        public static void HandleServerUpdateAccountData(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadBitsE<AccountDataType>("Data Type", 3);

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

            packet.ReadXORBytes(guid, 3, 1, 5);

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);
            pkt.ClosePacket(false);

            packet.AddValue("Account Data", data);

            packet.ReadXORBytes(guid, 7, 4, 0, 6, 2);

            packet.ReadTime("Login Time");

            packet.WriteGuid("GUID", guid);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:25,代码来源:AccountDataHandler.cs

示例4: HandleCompressedGuildRoster

 public static void HandleCompressedGuildRoster(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
             HandleGuildRoster422(packet2);
         else
             HandleGuildRoster406(packet2);
     }
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:10,代码来源:GuildHandler.cs

示例5: ReadUpdateAccountDataBlock

        public static void ReadUpdateAccountDataBlock(ref Packet packet)
        {
            packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);

            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            var pkt = packet.Inflate(decompCount, false);
            pkt.ReadWoWString("Account Data", decompCount);
            pkt.ClosePacket(false);
        }
开发者ID:DDuarte,项目名称:WowPacketParser,代码行数:11,代码来源:AccountDataHandler.cs

示例6: HandleClientUpdateAccountData

        public static void HandleClientUpdateAccountData(Packet packet)
        {
            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();
            var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);

            packet.WriteLine("Account Data {0}", data);
            packet.ReadEnum<AccountDataType>("Data Type", 3);
        }
开发者ID:Resike,项目名称:WowPacketParser,代码行数:11,代码来源:AccountDataHandler.cs

示例7: HandleClientUpdateAccountData

        public static void HandleClientUpdateAccountData(Packet packet)
        {
            var decompCount = packet.ReadInt32();
            packet.ReadTime("Login Time");
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);
            pkt.ClosePacket();

            packet.ReadBitsE<AccountDataType>("Data Type", 3);
            packet.AddValue("Account Data", data);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:13,代码来源:AccountDataHandler.cs

示例8: HandleServerUpdateAccountData

        public static void HandleServerUpdateAccountData(Packet packet)
        {
            packet.ReadPackedGuid128("Guid");
            packet.ReadTime("Time");

            var decompCount = packet.ReadInt32();
            packet.ResetBitReader();
            packet.ReadBitsE<AccountDataType>("Data Type", 3);
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);

            packet.AddValue("Account Data", data);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:15,代码来源:AccountDataHandler.cs

示例9: ReadUpdateAccountDataBlock

        public static void ReadUpdateAccountDataBlock(ref Packet packet)
        {
            packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);

            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            packet = packet.Inflate(decompCount);

            var data = packet.ReadBytes(decompCount);
            packet.Writer.WriteLine("Account Data: ");

            foreach (var b in data)
                packet.Writer.Write((char)b);

            packet.Writer.WriteLine();
        }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:17,代码来源:AccountDataHandler.cs

示例10: HandleServerUpdateAccountData

        public static void HandleServerUpdateAccountData(Packet packet)
        {
            var guid = new byte[8];

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();

            var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);
            packet.WriteLine("Account Data {0}", data);

            packet.ReadTime("Login Time");
            guid[7] = packet.ReadBit();
            packet.ReadEnum<AccountDataType>("Data Type", 3);
            packet.StartBitStream(guid, 3, 6, 1, 5, 0, 4, 2);
            packet.ReadXORBytes(guid, 6, 7, 4, 1, 5, 0, 3, 2);

            packet.WriteGuid("GUID", guid);
        }
开发者ID:Resike,项目名称:WowPacketParser,代码行数:18,代码来源:AccountDataHandler.cs

示例11: HandleCompressedMoves

        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();
        }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:20,代码来源:MovementHandler.cs

示例12: HandleGMTicketCreate

        public static void HandleGMTicketCreate(Packet packet)
        {
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadVector3("Position");
            packet.ReadCString("Text");
            packet.ReadUInt32("Need Response");
            packet.ReadBoolean("Need GM interaction");
            var count = packet.ReadInt32("Count");

            for (int i = 0; i < count; i++)
                packet.WriteLine("[" + i + "] Sent: " + (packet.Time - packet.ReadTime()).ToFormattedString());

            if (count == 0)
                packet.ReadInt32("Unk Int32");
            else
            {
                var decompCount = packet.ReadInt32();
                packet = packet.Inflate(decompCount);
                packet.WriteLine(packet.ReadCString());
            }
        }
开发者ID:skypeak,项目名称:WowPacketParser_SkyFire,代码行数:21,代码来源:TicketHandler.cs

示例13: HandleCompressedMoves

        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();
        }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:22,代码来源:MovementHandler.cs

示例14: HandleCompressedMoves

        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();
        }
开发者ID:Chaplain,项目名称:WowPacketParser,代码行数:23,代码来源:MovementHandler.cs

示例15: ReadClientAddonsList

        public static void ReadClientAddonsList(ref Packet packet)
        {
            var decompCount = packet.ReadInt32();
            packet = packet.Inflate(decompCount);

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

                for (var i = 0; i < count; i++)
                {
                    packet.ReadCString("Name", i);
                    packet.ReadBoolean("Enabled", i);
                    packet.ReadInt32("CRC", i);
                    packet.ReadInt32("Unk Int32", i);
                }

                packet.ReadTime("Time");
            }
            else
            {
                int count = 0;

                while (packet.GetPosition() != packet.GetLength())
                {
                    packet.ReadCString("Name");
                    packet.ReadBoolean("Enabled");
                    packet.ReadInt32("CRC");
                    packet.ReadInt32("Unk Int32");

                    count++;
                }

                _addonCount = count;
            }
        }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:37,代码来源:AddonHandler.cs


注:本文中的WowPacketParser.Misc.Packet.Inflate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。