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


C# Packet.ResetBitReader方法代码示例

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


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

示例1: HandleGuildBankActivate

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

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

示例2: 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

示例3: HandleGuildQueryResponse

        public static void HandleGuildQueryResponse(Packet packet)
        {
            packet.ReadPackedGuid128("Guild Guid");

            var hasData = packet.ReadBit();
            if (hasData)
            {
                packet.ReadPackedGuid128("GuildGUID");
                packet.ReadInt32("VirtualRealmAddress");
                var rankCount = packet.ReadInt32("RankCount");
                packet.ReadInt32("EmblemColor");
                packet.ReadInt32("EmblemStyle");
                packet.ReadInt32("BorderColor");
                packet.ReadInt32("BorderStyle");
                packet.ReadInt32("BackgroundColor");

                packet.ResetBitReader();
                var nameLen = packet.ReadBits(7);

                for (var i = 0; i < rankCount; i++)
                {
                    packet.ReadInt32("RankID", i);
                    packet.ReadInt32("RankOrder", i);

                    packet.ResetBitReader();
                    var rankNameLen = packet.ReadBits(7);
                    packet.ReadWoWString("Rank Name", rankNameLen, i);
                }

                packet.ReadWoWString("Guild Name", nameLen);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:32,代码来源:GuildHandler.cs

示例4: HandleAreaTriggerReShape

        public static void HandleAreaTriggerReShape(Packet packet)
        {
            packet.ReadPackedGuid128("TriggerGUID");

            packet.ResetBitReader();
            var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline");
            var hasAreaTriggerUnkType = packet.ReadBit("HasAreaTriggerUnkType");

            if (hasAreaTriggerSpline)
                ReadAreaTriggerSpline(packet);

            if (hasAreaTriggerUnkType)
            {
                packet.ResetBitReader();
                var unk1 = packet.ReadBit("AreaTriggerUnk1");
                var hasCenter = packet.ReadBit("HasCenter");
                packet.ReadBit("Unk bit 703 1");
                packet.ReadBit("Unk bit 703 2");

                packet.ReadUInt32("Unk UInt 1");
                packet.ReadInt32("Unk Int 1");
                packet.ReadUInt32("Unk UInt 2");
                packet.ReadSingle("Radius");
                packet.ReadSingle("BlendFromRadius");
                packet.ReadSingle("InitialAngel");
                packet.ReadSingle("ZOffset");

                if (unk1)
                    packet.ReadPackedGuid128("AreaTriggerUnkGUID");

                if (hasCenter)
                    packet.ReadVector3("Center");
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:34,代码来源:AreaTriggerHandler.cs

示例5: HandleCalendarSendEvent

        public static void HandleCalendarSendEvent(Packet packet)
        {
            packet.ReadByte("EventType");
            packet.ReadPackedGuid128("OwnerGUID");
            packet.ReadInt64("EventID");
            packet.ReadByte("GetEventType");
            packet.ReadInt32("TextureID");
            packet.ReadUInt32("Flags");
            packet.ReadUInt32("Date");
            packet.ReadUInt32("LockDate");
            packet.ReadPackedGuid128("EventGuildID");

            var inviteCount = packet.ReadInt32("InviteCount");

            packet.ResetBitReader();

            var lenEventName = packet.ReadBits(8);
            var lenDescription = packet.ReadBits(11);

            packet.ResetBitReader();

            for (int i = 0; i < inviteCount; i++)
                V6_0_2_19033.Parsers.CalendarHandler.ReadCalendarEventInviteInfo(packet, "Invites", i);

            packet.ReadWoWString("EventName", lenEventName);
            packet.ReadWoWString("Description", lenDescription);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:27,代码来源:CalendarHandler.cs

示例6: HandleGuildRoster

        public static void HandleGuildRoster(Packet packet)
        {
            packet.ReadUInt32("NumAccounts");
            packet.ReadPackedTime("CreateDate");
            packet.ReadUInt32("GuildFlags");
            var int20 = packet.ReadUInt32("MemberDataCount");

            packet.ResetBitReader();
            var bits2037 = packet.ReadBits(10);
            var bits9 = packet.ReadBits(11);

            for (var i = 0; i < int20; ++i)
            {
                packet.ReadPackedGuid128("Guid", i);

                packet.ReadUInt32("RankID", i);
                packet.ReadUInt32<AreaId>("AreaID", i);
                packet.ReadUInt32("PersonalAchievementPoints", i);
                packet.ReadUInt32("GuildReputation", i);

                packet.ReadSingle("LastSave", i);

                for (var j = 0; j < 2; ++j)
                {
                    packet.ReadUInt32("DbID", i, j);
                    packet.ReadUInt32("Rank", i, j);
                    packet.ReadUInt32("Step", i, j);
                }

                packet.ReadUInt32("VirtualRealmAddress", i);

                packet.ReadByteE<GuildMemberFlag>("Status", i);
                packet.ReadByte("Level", i);
                packet.ReadByteE<Class>("ClassID", i);
                packet.ReadByteE<Gender>("Gender", i);

                packet.ResetBitReader();

                var bits36 = packet.ReadBits(6);
                var bits92 = packet.ReadBits(8);
                var bits221 = packet.ReadBits(8);

                packet.ReadBit("Authenticated", i);
                packet.ReadBit("SorEligible", i);

                packet.ReadWoWString("Name", bits36, i);
                packet.ReadWoWString("Note", bits92, i);
                packet.ReadWoWString("OfficerNote", bits221, i);
            }

            packet.ReadWoWString("WelcomeText", bits2037);
            packet.ReadWoWString("InfoText", bits9);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:53,代码来源:GuildHandler.cs

示例7: HandleGuildClientSetNote

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

            playerGUID[1]  = packet.ReadBit();
            var noteLength = packet.ReadBits("note length", 8);
            var ispublic   = packet.ReadBit("IsPublic");
            playerGUID[4]  = packet.ReadBit();
            playerGUID[2]  = packet.ReadBit();
            playerGUID[3]  = packet.ReadBit();
            playerGUID[5]  = packet.ReadBit();
            playerGUID[0]  = packet.ReadBit();
            playerGUID[6]  = packet.ReadBit();
            playerGUID[7]  = packet.ReadBit();

            packet.ReadXORByte(playerGUID, 5);
            packet.ReadXORByte(playerGUID, 1);
            packet.ReadXORByte(playerGUID, 6);
            packet.ReadXORByte(playerGUID, 0);
            packet.ReadWoWString("note", noteLength);
            packet.ReadXORByte(playerGUID, 7);
            packet.ReadXORByte(playerGUID, 4);
            packet.ReadXORByte(playerGUID, 3);
            packet.ReadXORByte(playerGUID, 2);
            packet.ResetBitReader();

            packet.WriteGuid("Player GUID", playerGUID);
        }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:28,代码来源:GuildHandler.cs

示例8: HandleAutoStoreLootItem510

        public static void HandleAutoStoreLootItem510(Packet packet)
        {
            var counter = packet.ReadBits("Count", 23);

            var guid = new byte[counter][];

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

            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("Looter GUID", guid[i], i);
            }
        }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:29,代码来源:ItemHandler.cs

示例9: HandleContactList

        public static void HandleContactList(Packet packet)
        {
            packet.ReadInt32E<ContactListFlag>("List Flags");
            var bits6 = packet.ReadBits("ContactInfoCount", 8);

            for (var i = 0; i < bits6; i++)
            {
                packet.ReadPackedGuid128("Guid", i);
                packet.ReadPackedGuid128("WowAccount", i);

                packet.ReadInt32("VirtualRealmAddr", i);
                packet.ReadInt32("NativeRealmAddr", i);
                packet.ReadInt32("TypeFlags", i);

                packet.ReadByte("Status", i);

                packet.ReadInt32("AreaID", i);
                packet.ReadInt32("Level", i);
                packet.ReadInt32("ClassID", i);

                packet.ResetBitReader();

                var bits44 = packet.ReadBits(10);
                packet.ReadWoWString("Notes", bits44, i);
            }
        }
开发者ID:rob3ns,项目名称:PacketSniffer,代码行数:26,代码来源:ContactHandler.cs

示例10: HandleCalendarEventInviteAlert

        public static void HandleCalendarEventInviteAlert(Packet packet)
        {
            // TODO: find unks

            packet.ReadUInt64("EventID");
            packet.ReadPackedTime("Date");
            packet.ReadInt32E<CalendarFlag>("Flags");

            packet.ReadByteE<CalendarEventType>("EventType");

            packet.ReadInt32("TextureID");

            packet.ReadPackedGuid128("EventGuildID");

            packet.ReadUInt64("InviteID");

            packet.ReadByteE<CalendarEventStatus>("Status");
            packet.ReadByteE<CalendarModerationRank>("ModeratorStatus");

            packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");
            packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");

            var eventNameLength = packet.ReadBits("EventNameLength", 8);
            packet.ResetBitReader();

            packet.ReadWoWString("EventName", eventNameLength);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:27,代码来源:CalendarHandler.cs

示例11: HandleLootResponse

        public static void HandleLootResponse(Packet packet)
        {
            packet.ReadPackedGuid128("Owner");
            packet.ReadPackedGuid128("LootObj");
            packet.ReadByteE<LootError>("FailureReason");
            packet.ReadByteE<LootType>("AcquireReason");
            packet.ReadByteE<LootMethod>("LootMethod");
            packet.ReadByteE<ItemQuality>("Threshold");

            packet.ReadUInt32("Coins");

            var itemCount = packet.ReadUInt32("ItemCount");
            var currencyCount = packet.ReadUInt32("CurrencyCount");

            packet.ResetBitReader();

            packet.ReadBit("Acquired");
            packet.ReadBit("AELooting");
            packet.ReadBit("PersonalLooting");

            for (var i = 0; i < itemCount; ++i)
                ReadLootItem(packet, i, "LootItem");

            for (var i = 0; i < currencyCount; ++i)
                V6_0_2_19033.Parsers.LootHandler.ReadCurrenciesData(packet, i, "Currencies");
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:26,代码来源:LootHandler.cs

示例12: HandleGroupInvite

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

            packet.ReadInt32("Unk Int32"); // Non-zero in cross realm parties (1383)
            packet.ReadInt32("Unk Int32"); // Always 0
            packet.ReadByte("unk");

            guid[2] = packet.ReadBit();
            var strLen = packet.ReadBits(9);
            guid[0] = packet.ReadBit();

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

            var nameLen = packet.ReadBits(9);

            packet.ResetBitReader();

            packet.ReadXORByte(guid, 5);
            packet.ReadWoWString("Realm Name", strLen); // Non-empty in cross realm parties
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 7);
            packet.WriteGuid("Guid", guid); // Non-zero in cross realm parties
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:35,代码来源:GroupHandler.cs

示例13: HandleGMTicketCaseStatus

        public static void HandleGMTicketCaseStatus(Packet packet)
        {
            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_2_20444))
            {
                packet.ReadTime("OldestTicketTime");
                packet.ReadTime("UpdateTime");
            }

            var int24 = packet.ReadInt32("CasesCount");
            for (int i = 0; i < int24; i++)
            {
                packet.ReadInt32("CaseID", i);
                packet.ReadInt32("CaseOpened", i);
                packet.ReadInt32("CaseStatus", i);
                packet.ReadInt16("CfgRealmID", i);
                packet.ReadInt64("CharacterID", i);
                packet.ReadInt32("WaitTimeOverrideMinutes", i);

                packet.ResetBitReader();
                var bits12 = packet.ReadBits(11);
                var bits262 = packet.ReadBits(10);

                packet.ReadWoWString("Url", bits12, i);
                packet.ReadWoWString("WaitTimeOverrideMessage", bits262, i);
            }
        }
开发者ID:Gooyeth,项目名称:WowPacketParser,代码行数:26,代码来源:TicketHandler.cs

示例14: HandleItemPushResult

        public static void HandleItemPushResult(Packet packet)
        {
            packet.ReadPackedGuid128("PlayerGUID");

            packet.ReadByte("Slot");

            packet.ReadInt32("SlotInBag");

            packet.ReadUInt32("QuestLogItemID");
            packet.ReadUInt32("Quantity");
            packet.ReadUInt32("QuantityInInventory");
            packet.ReadInt32("DungeonEncounterID");

            packet.ReadUInt32("BattlePetBreedID");
            packet.ReadUInt32("BattlePetBreedQuality");
            packet.ReadUInt32("BattlePetSpeciesID");
            packet.ReadUInt32("BattlePetLevel");

            packet.ReadPackedGuid128("ItemGUID");

            packet.ResetBitReader();

            packet.ReadBit("Pushed");
            packet.ReadBit("Created");
            packet.ReadBits("DisplayText", 3);
            packet.ReadBit("IsBonusRoll");
            packet.ReadBit("IsEncounterLoot");

            V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, "ItemInstance");
        }
开发者ID:jackpoz,项目名称:WowPacketParser,代码行数:30,代码来源:ItemHandler.cs

示例15: HandleMailQueryNextTimeResult60x

        public static void HandleMailQueryNextTimeResult60x(Packet packet)
        {
            packet.ReadSingle("NextMailTime");

            var int5 = packet.ReadInt32("NextCount");

            for (int i = 0; i < int5; i++)
            {
                packet.ReadPackedGuid128("SenderGUID", i);

                // PlayerGuidLookupHint
                packet.ResetBitReader();

                var bit4 = packet.ReadBit("HasVirtualRealmAddress", i);
                var bit12 = packet.ReadBit("HasNativeRealmAddress", i);

                if (bit4)
                    packet.ReadInt32("VirtualRealmAddress", i);

                if (bit12)
                    packet.ReadInt32("NativeRealmAddress", i);

                packet.ReadSingle("TimeLeft", i);
                packet.ReadInt32("AltSenderID", i);
                packet.ReadByte("AltSenderType", i);
                packet.ReadInt32("StationeryID", i);
            }
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:28,代码来源:MailHandler.cs


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