• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Misc.Packet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: HandleDestroyObject

        public static void HandleDestroyObject(Packet packet)
        {
            packet.ReadGuid("GUID");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
                packet.ReadBoolean("Despawn Animation");
        }
开发者ID:Asdcrew,项目名称:WowPacketParser,代码行数:7,代码来源:UpdateHandler.cs


示例17: HandleAttackStartStop

        public static void HandleAttackStartStop(Packet packet)
        {
            packet.ReadPackedGuid128("Attacker Guid");
            packet.ReadPackedGuid128("Victim Guid");

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


示例18: HandleAuctionListBidderResult

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


示例19: HandleArenaTeamCommandResult

 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
 }
开发者ID:skypeak,项目名称:WowPacketParser_SkyFire,代码行数:7,代码来源:BattlegroundHandler.cs


示例20: HandleAddCalendarEvent

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Misc.Vector4类代码示例发布时间:2022-05-26
下一篇:
C# Misc.MovementInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap