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


C# Misc.Packet类代码示例

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


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

示例1: HandleAuctionListItems

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

示例2: HandleQuestCompleteQuest

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

示例3: HandleAchievementEarned

 public static void HandleAchievementEarned(Packet packet)
 {
     packet.ReadPackedGuid("Player GUID");
     packet.ReadInt32("Achievement");
     packet.ReadPackedTime("Time");
     packet.ReadInt32("Unk Int32");
 }
开发者ID:hodobaj,项目名称:StrawberryTools,代码行数:7,代码来源:AchievementHandler.cs

示例4: Handle41694

        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());
        }
开发者ID:hodobaj,项目名称:StrawberryTools,代码行数:33,代码来源:TestHandler.cs

示例5: HandleTradeGold

 public static void HandleTradeGold(Packet packet)
 {
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6_13596)) // Need correct version
         packet.ReadUInt64("Gold");
     else
         packet.ReadUInt32("Gold");
 }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:7,代码来源:TradeHandler.cs

示例6: HandleAvailableVoiceChannel

 public static void HandleAvailableVoiceChannel(Packet packet)
 {
     packet.ReadInt64("Unk Int64 1");
     packet.ReadByte("Channel Type");
     packet.ReadCString("Channel Name");
     packet.ReadInt64("Unk Int64 2");
 }
开发者ID:Asdcrew,项目名称:WowPacketParser,代码行数:7,代码来源:VoiceChatHandler.cs

示例7: HandleGameTimeUpdate

 public static void HandleGameTimeUpdate(Packet packet)
 {
     packet.ReadPackedTime("ServerTime");
     packet.ReadPackedTime("GameTime");
     packet.ReadInt32("ServerTimeHolidayOffset");
     packet.ReadInt32("GameTimeHolidayOffset");
 }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:7,代码来源:MovementHandler.cs

示例8: HandleDestroyObject

        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");
            }
        }
开发者ID:nelegalno,项目名称:WowPacketParser,代码行数:27,代码来源:UpdateHandler.cs

示例9: HandleCompressedUpdateObject

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

示例10: HandleGuildBankActivate

        public static void HandleGuildBankActivate(Packet packet)
        {
            packet.ReadPackedGuid128("Banker");

            packet.ResetBitReader();
            packet.ReadBit("FullUpdate");
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:7,代码来源:GuildHandler.cs

示例11: HandleGuildPartyStateResponse

 public static void HandleGuildPartyStateResponse(Packet packet)
 {
     packet.ReadSingle("Guild XP multiplier");
     packet.ReadInt32("Int10");
     packet.ReadInt32("Int14");
     packet.ReadBit("Is guild group");
 }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:7,代码来源:GuildHandler.cs

示例12: HandleBlackMarketItemResult

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

示例13: HandleBattlePayDistributionAssignToTarget

 public static void HandleBattlePayDistributionAssignToTarget(Packet packet)
 {
     packet.ReadInt32("ClientToken");
     packet.ReadInt64("DistributionID");
     packet.ReadPackedGuid128("TargetCharacter");
     packet.ReadInt32("ProductChoice");
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:7,代码来源:BattlePayHandler.cs

示例14: HandleClientEnterWorld

        public static void HandleClientEnterWorld(Packet packet)
        {
            var mapId = packet.ReadEntry<Int32>(StoreNameType.Map, "Map");
            packet.ReadBit("Loading");

            packet.AddSniffData(StoreNameType.Map, mapId, "LOAD_SCREEN");
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:7,代码来源:MiscellaneousHandler.cs

示例15: HandlePetNameQueryResponse

        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;
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:30,代码来源:PetHandler.cs


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