本文整理汇总了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();
}
示例2: Read
public IDataObject Read(PacketReader r)
{
ItemItem = r.ReadInt32();
SlotType = r.ReadInt32();
Tradable = r.ReadBoolean();
Included = r.ReadBoolean();
return this;
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例9: ReadCommand
public void ReadCommand(PacketReader reader)
{
TimeLeft = reader.ReadInt32();
if (reader.ReadBoolean())
{
var id = reader.ReadInt32();
CommandFactory.TryCreate(id, out EmbeddedCommand);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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
}