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


C# PacketReader.ReadBoolean方法代码示例

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


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

示例1: ReadPacket

 public void ReadPacket(PacketReader reader)
 {
     Unknown1 = reader.ReadBoolean();
     Unknown2 = reader.ReadBoolean();
     Unknown3 = reader.ReadInt32();
     Unknown4 = reader.ReadInt32();
 }
开发者ID:maithanhtan,项目名称:CoCSharp,代码行数:7,代码来源:AllianceRankingListRequestPacket.cs

示例2: Read

        public IDataObject Read(PacketReader r)
        {
            ItemItem = r.ReadInt32();
            SlotType = r.ReadInt32();
            Tradable = r.ReadBoolean();
            Included = r.ReadBoolean();

            return this;
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:9,代码来源:Item.cs

示例3: Read

        public override void Read(PacketReader r)
        {
            MyOffers = new bool[r.ReadInt16()];
            for (int i = 0; i < MyOffers.Length; i++)
                MyOffers[i] = r.ReadBoolean();

            YourOffers = new bool[r.ReadInt16()];
            for (int i = 0; i < YourOffers.Length; i++)
                YourOffers[i] = r.ReadBoolean();
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:10,代码来源:AcceptTradePacket.cs

示例4: ReadPacket

        public void ReadPacket(PacketReader reader)
        {
            UserID = reader.ReadInt64();
            UserToken = reader.ReadString();
            ClientMajorVersion = reader.ReadInt32();
            ClientContentVersion = reader.ReadInt32();
            ClientMinorVersion = reader.ReadInt32();
            FingerprintHash = reader.ReadString();

            Unknown1 = reader.ReadString();

            OpenUDID = reader.ReadString();
            MacAddress = reader.ReadString();
            DeviceModel = reader.ReadString();
            LocaleKey = reader.ReadInt32();
            Language = reader.ReadString();
            AdvertisingGUID = reader.ReadString();
            OsVersion = reader.ReadString();

            Unknown2 = (byte)reader.ReadByte();
            Unknown3 = reader.ReadString();

            AndroidDeviceID = reader.ReadString();
            FacebookDistributionID = reader.ReadString();
            IsAdvertisingTrackingEnabled = reader.ReadBoolean();
            VendorGUID = reader.ReadString();
            Seed = reader.ReadInt32();
        }
开发者ID:jibinthomas007,项目名称:CoCSharp,代码行数:28,代码来源:LoginRequestPacket.cs

示例5: IR_ARP

 /// <summary>
 /// Creates a new admin response packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IR_ARP(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     Admin = reader.ReadBoolean();
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:11,代码来源:IR_ARP.cs

示例6: ReadPacket

 public void ReadPacket(PacketReader reader)
 {
     RankList = new List<MemberInfo>();
     var count = reader.ReadInt32();
     for (int i = 0; i < count; i++)
     {
         var memberInfo = new MemberInfo();
         memberInfo.Unknown1 = reader.ReadInt64();
         memberInfo.Name = reader.ReadString();
         memberInfo.Rank = reader.ReadInt32();
         memberInfo.Trophies = reader.ReadInt32();
         memberInfo.Unknown2 = reader.ReadInt32();
         memberInfo.Level = reader.ReadInt32();
         memberInfo.AttacksWon = reader.ReadInt32();
         memberInfo.AttacksLost = reader.ReadInt32();
         memberInfo.DefencesWon = reader.ReadInt32();
         memberInfo.DefencesLost = reader.ReadInt32();
         memberInfo.Unknown3 = reader.ReadInt32();
         memberInfo.CountryCode = reader.ReadString();
         memberInfo.Unknown4 = reader.ReadInt64();
         memberInfo.Unknown5 = reader.ReadInt64();
         if (reader.ReadBoolean())
         {
             memberInfo.Clan = new Clan();
             memberInfo.Clan.ID = reader.ReadInt64();
             memberInfo.Clan.Name = reader.ReadString();
             memberInfo.Clan.Badge = reader.ReadInt32();
         }
         RankList.Add(memberInfo);
     }
 }
开发者ID:Baghe,项目名称:CoCSharp,代码行数:31,代码来源:AvatarLocalRankListResponsePacket.cs

示例7: ReadPacket

 public void ReadPacket(PacketReader reader)
 {
     Unknown1 = reader.ReadInt32();
     var count = reader.ReadInt32();
     Friends = new List<Friend>();
     for (int i = 0; i < count; i++)
     {
         Friend friend = new Friend();
         friend.UserID1 = reader.ReadInt64();
         friend.UserID2 = reader.ReadInt64();
         friend.Username = reader.ReadString();
         friend.FacebookID = reader.ReadString();
         friend.Unknown3 = reader.ReadString();
         friend.Unknown4 = reader.ReadInt32();
         friend.Level = reader.ReadInt32();
         friend.Unknown6 = reader.ReadInt32();
         friend.Trophies = reader.ReadInt32();
         friend.HasClan = reader.ReadBoolean();
         if (friend.HasClan)
         {
             friend.ClanID = reader.ReadInt64();
             friend.ClanUnknown1 = reader.ReadInt32();
             friend.ClanName = reader.ReadString();
             friend.ClanRole = reader.ReadInt32();
             friend.ClanLevel = reader.ReadInt32();
         }
         Friends.Add(friend);
     }
 }
开发者ID:maithanhtan,项目名称:CoCSharp,代码行数:29,代码来源:FriendListResponsePacket.cs

示例8: ReadPacket

 public void ReadPacket(PacketReader reader)
 {
     LeagueMemberList = new List<LeagueMember>();
     SeasonEndsSeconds = reader.ReadInt32();
     var count = reader.ReadInt32();
     for (int i = 0; i < count; i++)
     {
         LeagueMember leagueMember = new LeagueMember();
         leagueMember.UserID = reader.ReadInt64();
         leagueMember.Username = reader.ReadString();
         leagueMember.Rank = reader.ReadInt32();
         leagueMember.Trophies = reader.ReadInt32();
         leagueMember.LastRank = reader.ReadInt32();
         leagueMember.Unknown3 = reader.ReadInt32();
         leagueMember.AttacksWon = reader.ReadInt32();
         leagueMember.Unknown5 = reader.ReadInt32();
         leagueMember.DefensesWon = reader.ReadInt32();
         leagueMember.Unknown7 = reader.ReadInt32();
         leagueMember.Unknown8 = reader.ReadInt32();
         leagueMember.Unknown9 = reader.ReadInt32();
         leagueMember.Unknown10 = reader.ReadInt32();
         leagueMember.Unknown11 = reader.ReadInt32();
         leagueMember.HasClan = reader.ReadBoolean();
         if (leagueMember.HasClan)
         {
             leagueMember.ClanID = reader.ReadInt64();
             leagueMember.ClanName = reader.ReadString();
             leagueMember.Unknown12 = reader.ReadInt32();
         }
         leagueMember.Unknown13 = reader.ReadInt32();
         leagueMember.Unknown14 = reader.ReadInt32();
         LeagueMemberList.Add(leagueMember);
     }
 }
开发者ID:maithanhtan,项目名称:CoCSharp,代码行数:34,代码来源:LeagueMemberListResponsePacket.cs

示例9: ReadCommand

 public void ReadCommand(PacketReader reader)
 {
     TimeLeft = reader.ReadInt32();
     if (reader.ReadBoolean())
     {
         var id = reader.ReadInt32();
         CommandFactory.TryCreate(id, out EmbeddedCommand);
     }
 }
开发者ID:maithanhtan,项目名称:CoCSharp,代码行数:9,代码来源:FreeWorkerCommand.cs

示例10: World_HandleEnableMicrophone

        /// <summary>
        /// 
        /// </summary>
        /// <param name="netState"></param>
        /// <param name="packetReader"></param>
        internal static void World_HandleEnableMicrophone( NetState netState, PacketReader packetReader )
        {
            WorldExtendData extendData = netState.GetComponent<WorldExtendData>( WorldExtendData.COMPONENT_ID );
            if ( extendData == null )
            {
                Debug.WriteLine( "World_PacketHandlers.World_HandleEnableMicrophone(...) - extendData == null error!" );
                return;
            }

            if ( extendData.IsLoggedIn == false )
            {
                Debug.WriteLine( "World_PacketHandlers.World_HandleEnableMicrophone(...) - extendData.IsLoggedIn == false error!" );
                return;
            }

            bool bVoiceEnabled = packetReader.ReadBoolean();
            bool bMicEnabled = packetReader.ReadBoolean();
        }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:23,代码来源:HandleEnableMicrophone.cs

示例11: IS_FLG

 /// <summary>
 /// Creates a new flag packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_FLG(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     OffOn = reader.ReadBoolean();
     Flag = (FlagType)reader.ReadByte();
     CarBehind = reader.ReadByte();
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:15,代码来源:IS_FLG.cs

示例12: Read

        public override void Read(PacketReader r)
        {
            Width = r.ReadInt32();
            Height = r.ReadInt32();
            Name = r.ReadString();
            DisplayName = r.ReadString();
            Fp = r.ReadUInt32();
            Background = r.ReadInt32();
            Difficulty = r.ReadInt32();
            AllowPlayerTeleport = r.ReadBoolean();
            ShowDisplays = r.ReadBoolean();

            ClientXML = new string[r.ReadInt16()];
            for (int i = 0; i < ClientXML.Length; i++)
                ClientXML[i] = r.ReadUTF32();

            ExtraXML = new string[r.ReadInt16()];
            for (int i = 0; i < ExtraXML.Length; i++)
                ExtraXML[i] = r.ReadUTF32();
        }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:20,代码来源:MapInfoPacket.cs

示例13: ReadCommand

 public void ReadCommand(PacketReader reader)
 {
     ResourceID = reader.ReadInt32();
     Amount = reader.ReadInt32();
     if (reader.ReadBoolean())
     {
         var id = reader.ReadInt32();
         CommandFactory.TryCreate(id, out EmbeddedCommand);
     }
     Unknown1 = reader.ReadInt32();
 }
开发者ID:maithanhtan,项目名称:CoCSharp,代码行数:11,代码来源:BuyResourcesCommand.cs

示例14: IS_ACR

 /// <summary>
 /// Creates a new <see cref="IS_ACR"/> object.
 /// </summary>
 /// <param name="buffer">The packet data.</param>
 public IS_ACR(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     UCID = reader.ReadByte();
     Admin = reader.ReadBoolean();
     Result = (AdminResult)reader.ReadByte();
     reader.Skip(1);
     Text = reader.ReadString(64);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:16,代码来源:IS_ACR.cs

示例15: IS_NCN

 /// <summary>
 /// Creates a new new connection packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_NCN(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     UCID = reader.ReadByte();
     UName = reader.ReadString(24);
     PName = reader.ReadString(24);
     Admin = reader.ReadBoolean();
     Total = reader.ReadByte();
     Remote = (reader.ReadByte() & 4) > 0; // bit 2: remote
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:17,代码来源:IS_NCN.cs


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