本文整理汇总了C#中PacketWriter.WriteBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.WriteBoolean方法的具体用法?C# PacketWriter.WriteBoolean怎么用?C# PacketWriter.WriteBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.WriteBoolean方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteBoolean(Unknown1);
writer.WriteBoolean(Unknown2);
writer.WriteInt32(Unknown3);
writer.WriteInt32(Unknown3);
}
示例2: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(Unknown1);
writer.WriteBoolean(HashRequestMessage);
if (HashRequestMessage)
writer.WriteString(Message);
}
示例3: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(RankList.Count);
for (int i = 0; i < RankList.Count; i++)
{
var memberInfo = RankList[i];
writer.WriteInt64(memberInfo.Unknown1);
writer.WriteString(memberInfo.Name);
writer.WriteInt32(memberInfo.Rank);
writer.WriteInt32(memberInfo.Trophies);
writer.WriteInt32(memberInfo.Unknown2);
writer.WriteInt32(memberInfo.Level);
writer.WriteInt32(memberInfo.AttacksWon);
writer.WriteInt32(memberInfo.AttacksLost);
writer.WriteInt32(memberInfo.DefencesWon);
writer.WriteInt32(memberInfo.DefencesLost);
writer.WriteInt32(memberInfo.Unknown3);
writer.WriteString(memberInfo.CountryCode);
writer.WriteInt64(memberInfo.Unknown4);
writer.WriteInt64(memberInfo.Unknown5);
if (memberInfo.Clan != null)
{
writer.WriteBoolean(true);
writer.WriteInt64(memberInfo.Clan.ID);
writer.WriteString(memberInfo.Clan.Name);
writer.WriteInt32(memberInfo.Clan.Badge);
}
}
}
示例4: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(Unknown1);
writer.WriteInt32(Friends.Count);
for (int i = 0; i < Friends.Count; i++)
{
var friend = Friends[i];
writer.WriteInt64(friend.UserID1);
writer.WriteInt64(friend.UserID2);
writer.WriteString(friend.Username);
writer.WriteString(friend.FacebookID);
writer.WriteString(friend.Unknown3);
writer.WriteInt32(friend.Unknown4);
writer.WriteInt32(friend.Level);
writer.WriteInt32(friend.Unknown6);
writer.WriteInt32(friend.Trophies);
writer.WriteBoolean(friend.HasClan);
if (friend.HasClan)
{
writer.WriteInt64(friend.ClanID);
writer.WriteInt32(friend.ClanUnknown1);
writer.WriteString(friend.ClanName);
writer.WriteInt32(friend.ClanRole);
writer.WriteInt32(friend.ClanLevel);
}
}
}
示例5: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt64(UserID);
writer.WriteString(UserToken);
writer.WriteInt32(ClientMajorVersion);
writer.WriteInt32(ClientContentVersion);
writer.WriteInt32(ClientMinorVersion);
writer.WriteString(FingerprintHash);
writer.WriteString(Unknown1);
writer.WriteString(OpenUDID);
writer.WriteString(MacAddress);
writer.WriteString(DeviceModel);
writer.WriteInt32(LocaleKey);
writer.WriteString(Language);
writer.WriteString(AdvertisingGUID);
writer.WriteString(OSVersion);
writer.WriteByte(Unknown2);
writer.WriteString(Unknown3);
writer.WriteString(AndroidDeviceID);
writer.WriteString(FacebookDistributionID);
writer.WriteBoolean(IsAdvertisingTrackingEnabled);
writer.WriteString(VendorGUID);
writer.WriteInt32(Seed);
}
示例6: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(SeasonEndsSeconds);
var count = LeagueMemberList.Count;
for (int i = 0; i < count; i++)
{
var leagueMember = LeagueMemberList[i];
writer.WriteInt64(leagueMember.UserID);
writer.WriteString(leagueMember.Username);
writer.WriteInt32(leagueMember.Rank);
writer.WriteInt32(leagueMember.Trophies);
writer.WriteInt32(leagueMember.LastRank);
writer.WriteInt32(leagueMember.Unknown3);
writer.WriteInt32(leagueMember.AttacksWon);
writer.WriteInt32(leagueMember.Unknown5);
writer.WriteInt32(leagueMember.DefensesWon);
writer.WriteInt32(leagueMember.Unknown7);
writer.WriteInt32(leagueMember.Unknown8);
writer.WriteInt32(leagueMember.Unknown9);
writer.WriteInt32(leagueMember.Unknown10);
writer.WriteInt32(leagueMember.Unknown11);
writer.WriteBoolean(leagueMember.HasClan);
if (leagueMember.HasClan)
{
writer.WriteInt64(leagueMember.ClanID);
writer.WriteString(leagueMember.ClanName);
writer.WriteInt32(leagueMember.Unknown12);
}
writer.WriteInt32(leagueMember.Unknown13);
writer.WriteInt32(leagueMember.Unknown14);
}
}
示例7: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteString(Message);
writer.WriteString(Username);
writer.WriteInt32(Level);
writer.WriteInt32(League);
writer.WriteInt64(UserID);
writer.WriteInt64(UserID2);
writer.WriteBoolean(HasClan);
if (HasClan)
{
writer.WriteInt64(ClanID);
writer.WriteString(ClanName);
writer.WriteInt32(Unknown3);
}
}
示例8: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteString(ClanDescription);
writer.WriteInt32(Unknown1);
writer.WriteInt32(Unknown2);
writer.WriteBoolean(Unknown3);
if (Unknown3)
writer.WriteInt64(Unknown4);
writer.WriteInt64(ClanID);
writer.WriteString(ClanName);
writer.WriteInt32(ClanBadge);
writer.WriteInt32(ClanJoinType);
writer.WriteInt32(ClanMemberCount);
writer.WriteInt32(ClanTrophies);
writer.WriteInt32(ClanMinTrophies);
writer.WriteInt32(ClanWarsWon);
writer.WriteInt32(ClanWarsLost);
writer.WriteInt32(ClanWarsDraw);
writer.WriteInt32(Unknown5);
writer.WriteInt32(Unknown6);
writer.WriteInt32(Unknown7);
writer.WriteInt32(ClanEP);
writer.WriteInt32(ClanLevel);
}
示例9: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteBoolean(Unknown1);
writer.WriteString(NumericFacebookID);
writer.WriteString(Base64FacebookToken);
}
示例10: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteString(NewName);
writer.WriteBoolean(Unknown1);
}
示例11: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(BuildingID);
writer.WriteBoolean(IsSleeping);
writer.WriteInt32(Unknown1);
}
示例12: Write
public void Write(PacketWriter writer)
{
writer.WriteInt64(ClanID);
writer.WriteString(ClanName);
writer.WriteInt32(ClanBadge);
writer.WriteInt32(ClanLevel);
writer.WriteInt32(PlayerCount);
for (int i = 0; i < PlayerCount; i++)
{
var player = Roster[i];
writer.WriteInt64(player.ClanID);
writer.WriteInt64(player.ID1);
writer.WriteInt64(player.ID2);
writer.WriteString(player.Name);
writer.WriteInt32(player.StarsGivenUp);
writer.WriteInt32(player.Damage);
writer.WriteInt32(player.Unknown1);
writer.WriteInt32(player.AttacksUsed);
writer.WriteInt32(player.TotalDefenses);
writer.WriteInt32(player.GoldGained);
writer.WriteInt32(player.ElixirGained);
writer.WriteInt32(player.DarkElixirGained);
writer.WriteInt32(player.GoldAvailable);
writer.WriteInt32(player.ElixirAvailable);
writer.WriteInt32(player.DarkElixirAvailable);
writer.WriteInt32(player.OffenseWeight);
writer.WriteInt32(player.DefenseWeight);
writer.WriteInt32(player.Unknown2);
writer.WriteInt32(player.TownHall);
writer.WriteByte(player.Unknown3);
writer.WriteInt32(player.Unknown4);
writer.WriteInt32(player.Unknown5);
writer.WriteInt32(player.Unknown6);
writer.WriteBoolean(player.IsBattleDay);
if (player.IsBattleDay)
{
writer.WriteInt32(player.Unknown7);
writer.WriteInt32(player.Unknown8);
writer.WriteBoolean(player.HasBeenAttacked);
if (player.HasBeenAttacked)
{
writer.WriteInt32(player.Unknown9);
writer.WriteInt32(player.BestAttackReplayID);
}
}
writer.WriteInt32(player.Unknown10);
writer.WriteInt32(player.ClanCastle);
writer.WriteInt32(player.TroopCapacity);
writer.WriteString(player.RequestMessage);
writer.WriteInt32(player.TroopCount);
int listIdx = 0;
int sizeJ = (int)player.TroopsInside[listIdx++];
writer.WriteInt32(sizeJ);
for (int j = 0; j < sizeJ; j++)
{
writer.WriteInt64(player.TroopsInside[listIdx++]);
int sizeK = (int)player.TroopsInside[listIdx++];
writer.WriteInt32(sizeK);
for (int k = 0; k < sizeK; k++)
writer.WriteInt64(player.TroopsInside[listIdx++]);
}
}
}