當前位置: 首頁>>代碼示例>>C#>>正文


C# Packet.ReadBoolean方法代碼示例

本文整理匯總了C#中WowPacketParser.Misc.Packet.ReadBoolean方法的典型用法代碼示例。如果您正苦於以下問題:C# Packet.ReadBoolean方法的具體用法?C# Packet.ReadBoolean怎麽用?C# Packet.ReadBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WowPacketParser.Misc.Packet的用法示例。


在下文中一共展示了Packet.ReadBoolean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

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

示例2: HandleBotDetected

 public static void HandleBotDetected(Packet packet)
 {
     packet.ReadBoolean("Glider 1 Detected");
     packet.ReadBoolean("Glider 2 Detected");
     packet.ReadBoolean("Inner Space Detected");
     packet.ReadBytes(20); // Hash
 }
開發者ID:Nihilianth,項目名稱:WowPacketParser,代碼行數:7,代碼來源:WardenHandler.cs

示例3: HandleServerAddonsList

        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);
                }
            }
        }
開發者ID:hodobaj,項目名稱:WowPacketParser,代碼行數:57,代碼來源:AddonHandler.cs

示例4: HandleInstanceLockWarningQuery

        public static void HandleInstanceLockWarningQuery(Packet packet)
        {
            packet.ReadInt32("Time");
            packet.ReadInt32("Encounters Completed Mask");
            packet.ReadBoolean("Extending");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623)) // guessing
                packet.ReadBoolean("Locked warning"); // Displays a window asking if the player choose to join an instance which is saved.
        }
開發者ID:hodobaj,項目名稱:WowPacketParser,代碼行數:9,代碼來源:InstanceHandler.cs

示例5: HandleLfgBootProposalUpdate

 public static void HandleLfgBootProposalUpdate(Packet packet)
 {
     packet.ReadBoolean("In Progress");
     packet.ReadBoolean("Did Vote");
     packet.ReadBoolean("Vote");
     packet.ReadGuid("Victim GUID");
     packet.ReadInt32("Total Votes");
     packet.ReadInt32("Agree Count");
     packet.ReadInt32("Time Left");
     packet.ReadInt32("Needed Votes");
     packet.ReadCString("Comment");
 }
開發者ID:CarlosX,項目名稱:WowPacketParser,代碼行數:12,代碼來源:LfgHandler.cs

示例6: HandleRaidInstanceMessage

 public static void HandleRaidInstanceMessage(Packet packet)
 {
     var type = packet.ReadEnum<RaidInstanceResetWarning>("Warning Type", TypeCode.Int32);
     packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map Id");
     packet.ReadEnum<MapDifficulty>("Difficulty", TypeCode.Int32);
     packet.ReadInt32("Reset time");
     if (type == RaidInstanceResetWarning.Welcome)
     {
         packet.ReadBoolean("Unk bool");
         packet.ReadBoolean("Is Extended");
     }
 }
開發者ID:CarlosX,項目名稱:WowPacketParser,代碼行數:12,代碼來源:InstanceHandler.cs

示例7: HandleServerAddonsList

        public static void HandleServerAddonsList(Packet packet)
        {
            for (var i = 0; i < _addonCount; i++)
            {
                packet.ReadByte("Addon State");

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

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

                    if (usePublicKey)
                    {
                        var pubKey = packet.ReadChars(256);
                        packet.Writer.Write("Public Key: ");

                        foreach (var t in pubKey)
                            packet.Writer.Write(t);
                    }

                    packet.ReadInt32("Unk Int32");
                }

                var unkByte2 = packet.ReadBoolean("Use URL File");

                if (!unkByte2)
                    continue;

                packet.ReadCString("Addon URL File");
            }

            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");

                    var unkStr2 = packet.ReadBytes(16);
                    packet.Writer.WriteLine("Unk Hash 1: " + Utilities.ByteArrayToHexString(unkStr2));

                    var unkStr3 = packet.ReadBytes(16);
                    packet.Writer.WriteLine("Unk Hash 2: " + Utilities.ByteArrayToHexString(unkStr3));

                    packet.ReadInt32("Unk Int32 3");

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
                        packet.ReadInt32("Unk Int32 4");
                }
            }
        }
開發者ID:CarlosX,項目名稱:WowPacketParser,代碼行數:53,代碼來源:AddonHandler.cs

示例8: HandleNpcGossip

        public static void HandleNpcGossip(Packet packet)
        {
            var gossip = new Gossip();

            var guid = packet.ReadGuid("GUID");

            gossip.ObjectType = guid.GetObjectType();
            gossip.ObjectEntry = guid.GetEntry();

            var menuId = packet.ReadUInt32("Menu Id");

            if (ClientVersion.AddedInVersion(ClientType.MistsOfPandaria))
                packet.ReadUInt32("Unk int32");

            var textId = packet.ReadUInt32("Text Id");

            if (guid.GetObjectType() == ObjectType.Unit)
                if (Storage.Objects.ContainsKey(guid))
                        ((Unit) Storage.Objects[guid].Item1).GossipId = menuId;

            var count = packet.ReadUInt32("Amount of Options");

            gossip.GossipOptions = new List<GossipOption>((int) count);
            for (var i = 0; i < count; i++)
            {
                var gossipOption = new GossipOption
                {
                    Index = packet.ReadUInt32("Index", i),
                    OptionIcon = packet.ReadEnum<GossipOptionIcon>("Icon", TypeCode.Byte, i),
                    Box = packet.ReadBoolean("Box", i),
                    RequiredMoney = packet.ReadUInt32("Required money", i),
                    OptionText = packet.ReadCString("Text", i),
                    BoxText = packet.ReadCString("Box Text", i)
                };

                gossip.GossipOptions.Add(gossipOption);
            }
            Storage.Gossips.Add(Tuple.Create(menuId, textId), gossip, packet.TimeSpan);
            packet.AddSniffData(StoreNameType.Gossip, (int)menuId, guid.GetEntry().ToString(CultureInfo.InvariantCulture));

            var questgossips = packet.ReadUInt32("Amount of Quest gossips");
            for (var i = 0; i < questgossips; i++)
            {
                packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest ID", i);

                packet.ReadUInt32("Icon", i);
                packet.ReadInt32("Level", i);
                packet.ReadEnum<QuestFlags>("Flags", TypeCode.UInt32, i);
                packet.ReadBoolean("Unk Bool", i);
                packet.ReadCString("Title", i);
            }
        }
開發者ID:KazanCn,項目名稱:WowPacketParser,代碼行數:52,代碼來源:NpcHandler.cs

示例9: HandleRaidInstanceInfo

 public static void HandleRaidInstanceInfo(Packet packet)
 {
     var counter = packet.ReadInt32("Counter");
     for (var i = 0; i < counter; ++i)
     {
         packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID", i);
         packet.ReadEnum<MapDifficulty>("Map Difficulty", TypeCode.UInt32, i);
         packet.ReadGuid("Instance GUID", i);
         packet.ReadBoolean("Expired", i);
         packet.ReadBoolean("Extended", i);
         packet.ReadUInt32("Reset Time", i);
     }
 }
開發者ID:CarlosX,項目名稱:WowPacketParser,代碼行數:13,代碼來源:InstanceHandler.cs

示例10: HandleNpcGossip

        public static void HandleNpcGossip(Packet packet)
        {
            var guid = packet.ReadGuid("GUID");
            var menuid = packet.ReadUInt32("Menu id");
            var textid = packet.ReadUInt32("Text id");

            GossipMenu gossip = new GossipMenu
            {
                MenuId = menuid,
                GossipOptions = new List<GossipOption>(),
                NpcTextId = textid
            };

            gossip = Stuffing.Gossips.GetOrAdd(Tuple.Create<uint,uint>(guid.GetEntry(),menuid), gossip);

            var count = packet.ReadUInt32("Amount of Options");

            for (var i = 0; i < count; i++)
            {
                GossipOption opt = new GossipOption
                {
                    Index = packet.ReadUInt32("Index", i),
                    OptionIcon = packet.ReadByte("Icon", i),
                    Box = packet.ReadBoolean("Box", i),
                    RequiredMoney = packet.ReadUInt32("Required money", i),
                    OptionText = packet.ReadCString("Text", i),
                    BoxText = packet.ReadCString("Box Text", i)
                };
                gossip.GossipOptions.Add(opt);
            }

            Stuffing.Gossips.AddOrUpdate(Tuple.Create<uint,uint>(guid.GetEntry(),menuid), gossip, (a,b) =>
            {
                b.GossipOptions = gossip.GossipOptions;
                b.NpcTextId = gossip.NpcTextId;
                return b;
            });

            var questgossips = packet.ReadUInt32("Amount of Quest gossips");
            for (var i = 0; i < questgossips; i++)
            {
                packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest ID", i);

                packet.ReadUInt32("Icon", i);
                packet.ReadInt32("Level", i);
                packet.ReadEnum<QuestFlags>("Flags", TypeCode.UInt32, i);
                packet.ReadBoolean("Unk Bool", i);
                packet.ReadCString("Title", i);
            }
        }
開發者ID:Subv,項目名稱:WowPacketParser,代碼行數:50,代碼來源:NpcHandler.cs

示例11: HandleLfgBootProposalUpdate

 public static void HandleLfgBootProposalUpdate(Packet packet)
 {
     packet.ReadBoolean("In Progress");
     packet.ReadBoolean("Did Vote");
     packet.ReadBoolean("Vote");
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
         packet.ReadByte("Unk");
     packet.ReadGuid("Victim GUID");
     packet.ReadInt32("Total Votes");
     packet.ReadInt32("Agree Count");
     packet.ReadInt32("Time Left");
     packet.ReadInt32("Needed Votes");
     packet.ReadCString("Comment");
 }
開發者ID:Bootz,項目名稱:WowPacketParser,代碼行數:14,代碼來源:LfgHandler.cs

示例12: HandleGetGMTicket

        public static void HandleGetGMTicket(Packet packet)
        {
            var unk = packet.ReadInt32("Unk UInt32");
            if (unk != 6)
                return;

            packet.ReadInt32("TicketID");
            packet.ReadCString("Description");
            packet.ReadByte("Category");
            packet.ReadSingle("Ticket Age");
            packet.ReadSingle("Oldest Ticket Time");
            packet.ReadSingle("Update Time");
            packet.ReadBoolean("Assigned to GM");
            packet.ReadBoolean("Opened by GM");
        }
開發者ID:skypeak,項目名稱:WowPacketParser_SkyFire,代碼行數:15,代碼來源:TicketHandler.cs

示例13: HandleAddCalendarEvent

        public static void HandleAddCalendarEvent(Packet packet)
        {
            packet.ReadCString("Title");
            packet.ReadCString("Description");
            packet.ReadEnum<CalendarEventType>("Event Type", TypeCode.Byte);
            packet.ReadBoolean("Repeatable");
            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.WithoutInvites) != 0)
                return;

            var count = packet.ReadInt32("Invite Count");

            if (count <= 0)
                return;

            packet.ReadPackedGuid("Creator GUID");
            packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
            packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
        }
開發者ID:CarlosX,項目名稱:WowPacketParser,代碼行數:25,代碼來源:CalendarHandler.cs

示例14: HandleArenaTeamRoster

        public static void HandleArenaTeamRoster(Packet packet)
        {
            packet.ReadUInt32("Team Id");
            var unk = packet.ReadByte("Unk Byte");
            var count = packet.ReadUInt32("Member count");
            packet.ReadUInt32("Type");

            for (var i = 0; i < count; i++)
            {
                packet.ReadGuid(" GUID", i);
                packet.ReadBoolean("Online", i);
                packet.ReadCString("Name", i);
                packet.ReadUInt32("Captain", i);
                packet.ReadByte("Level", i);
                packet.ReadByte("Class", i);
                packet.ReadUInt32("Week Games", i);
                packet.ReadUInt32("Week Win", i);
                packet.ReadUInt32("Seasonal Games", i);
                packet.ReadUInt32("Seasonal Wins", i);
                packet.ReadUInt32("Personal Rating", i);
                if (unk > 0)
                {
                    packet.ReadSingle("Unk float 1", i);
                    packet.ReadSingle("Unk float 2", i);
                }
            }
        }
開發者ID:Asdcrew,項目名稱:WowPacketParser,代碼行數:27,代碼來源:BattlegroundHandler.cs

示例15: HandleArenaTeamRoster

        public static void HandleArenaTeamRoster(Packet packet)
        {
            packet.ReadUInt32("Team Id");
            var unk = packet.ReadByte("Unk Byte");
            var count = packet.ReadUInt32("Member count");
            packet.ReadUInt32("Type");

            for (var i = 0; i < count; i++)
            {
                packet.ReadGuid("[" + i + "] GUID");
                packet.ReadBoolean("[" + i + "] Online");
                packet.ReadCString("[" + i + "] Name");
                packet.ReadUInt32("[" + i + "] Captain");
                packet.ReadByte("[" + i + "] Level");
                packet.ReadByte("[" + i + "] Class");
                packet.ReadUInt32("[" + i + "] Week Games");
                packet.ReadUInt32("[" + i + "] Week Win");
                packet.ReadUInt32("[" + i + "] Seasonal Games");
                packet.ReadUInt32("[" + i + "] Seasonal Wins");
                packet.ReadUInt32("[" + i + "] Personal Rating");
                if (unk > 0)
                {
                    packet.ReadSingle("[" + i + "] Unk float 1");
                    packet.ReadSingle("[" + i + "] Unk float 2");
                }

            }
        }
開發者ID:Supabad,項目名稱:WowPacketParser,代碼行數:28,代碼來源:BattlegroundHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ReadBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。