本文整理汇总了C#中PacketWriter.WriteInt32方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.WriteInt32方法的具体用法?C# PacketWriter.WriteInt32怎么用?C# PacketWriter.WriteInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.WriteInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(X);
writer.WriteInt32(Y);
writer.WriteInt32(UnitID);
writer.WriteInt32(Unknown1);
}
示例2: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteBoolean(Unknown1);
writer.WriteBoolean(Unknown2);
writer.WriteInt32(Unknown3);
writer.WriteInt32(Unknown3);
}
示例3: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(BuildingID);
writer.WriteInt32(Unknown1);
writer.WriteInt32(Unknown2);
writer.WriteInt32(Unknown3);
}
示例4: 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(""); // Unknown 1
writer.WriteString(OpenUDID);
writer.WriteString(MacAddress);
writer.WriteString(DeviceModel);
writer.WriteInt32(LocaleKey);
writer.WriteString(Language);
writer.WriteString(AdvertisingGUID);
writer.WriteString(OsVersion);
writer.WriteByte(1); // Unknown 2
writer.WriteString(""); // Unknown 3
writer.WriteString(AndroidDeviceID);
writer.WriteString(FacebookDistributionID);
writer.WriteBoolean(IsAdvertisingTrackingEnabled);
writer.WriteString(VendorGUID);
writer.WriteInt32(Seed);
}
示例5: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(BuildingID);
writer.WriteInt32(Unknown1);
writer.WriteInt32(CharacterID);
writer.WriteInt32(Count);
writer.WriteInt32(Unknown2);
}
示例6: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(ResourceID);
writer.WriteInt32(Amount);
if (EmbeddedCommand != null)
EmbeddedCommand.WriteCommand(writer);
writer.WriteInt32(Unknown1);
}
示例7: 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);
}
}
}
示例8: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(Subtick);
writer.WriteInt32(Checksum);
writer.WriteInt32(Commands.Length);
for (int i = 0; i < Commands.Length; i++)
{
writer.WriteInt32(Commands[i].ID);
Commands[i].WriteCommand(writer);
}
}
示例9: WriteCommand
public void WriteCommand(PacketWriter writer)
{
writer.WriteInt32(Unknown1);
writer.WriteBoolean(HashRequestMessage);
if (HashRequestMessage)
writer.WriteString(Message);
}
示例10: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt64(UserID);
writer.WriteInt64(UserID1);
writer.WriteString(UserToken);
writer.WriteString(FacebookID);
writer.WriteString(GameCenterID);
writer.WriteInt32(MajorVersion);
writer.WriteInt32(MinorVersion);
writer.WriteInt32(RevisionVersion);
writer.WriteString(ServerEnvironment);
writer.WriteInt32(LoginCount);
writer.WriteInt32((int)PlayTime.TotalSeconds);
writer.WriteInt32(Unknown1);
writer.WriteString(FacebookAppID);
writer.WriteString(DateTimeConverter.ToJavaTimestamp(DateLastPlayed).ToString()); // should round stuff?
writer.WriteString(DateTimeConverter.ToJavaTimestamp(DateJoined).ToString());
writer.WriteInt32(Unknown2);
writer.WriteString(GooglePlusID);
writer.WriteString(CountryCode);
}
示例11: 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);
}
}
示例12: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(MessageType);
writer.WriteInt32(Unknown1);
writer.WriteUInt32(ServerTick);
writer.WriteByte(Unknown2);
switch (MessageType)
{
case 1:
break;
case 2:
writer.WriteInt64(UserID);
writer.WriteInt64(UserID2);
writer.WriteString(Username);
writer.WriteInt32(Unknown3);
writer.WriteInt32(Unknown4);
writer.WriteInt32((int)MemberStatus);
writer.WriteInt32((int)MessageTime.TotalSeconds);
writer.WriteString(Message);
break;
default:
break;
}
}
示例13: WritePacket
public void WritePacket(PacketWriter writer)
{
writer.WriteInt32(WarEntries.Count);
for (int i = 0; i < WarEntries.Count; i++)
{
var log = WarEntries[i];
writer.WriteInt64(log.HomeClanID);
writer.WriteString(log.HomeClanName);
writer.WriteInt32(log.HomeClanBadge);
writer.WriteInt32(log.HomeClanLevel);
writer.WriteInt64(log.EnemyClanID);
writer.WriteString(log.EnemyClanName);
writer.WriteInt32(log.EnemyClanBadge);
writer.WriteInt32(log.EnemyClanLevel);
writer.WriteInt32(log.HomeClanStarsWon);
writer.WriteInt32(log.EnemyClanStarsWon);
writer.WriteInt32((int)log.HomeClanPercentage * 10); // TODO: Find a more consistent solution.
writer.WriteInt32((int)log.EnemyClanPercentage * 10);
writer.WriteInt32(log.Unknown1);
writer.WriteInt32(log.Unknown2);
writer.WriteInt32(log.Unknown3);
writer.WriteInt32(log.HomeClanPointsGained);
writer.WriteInt64(log.Unknown4);
writer.WriteInt32(log.Unknown5);
writer.WriteInt32(log.Unknown6);
writer.WriteInt32(log.Unknown7);
writer.WriteInt32(log.Unknown8);
writer.WriteInt32(log.Unknown9);
writer.WriteByte(log.Unknown10);
}
}
示例14: CreateBuff
/// <summary>
/// Create 'PlayerCharacterList' packet
/// </summary>
/// <returns></returns>
public byte[] CreateBuff()
{
byte[] block = new byte[0x120]; // Create our null byte array
PacketWriter PW = new PacketWriter(block); // Initialize the writer
PW.WriteByteArray(0, EngineUtils.PacketUtils.calcPacket(block.Length, 0x90E)); // Write the packet header
PW.WriteString(5, EngineEnum.PacketEnum.PacketCommand.success_0); // Write the success string cmd
PW.WriteString(30, charname); // Write the character name, you can use some html code like: <#ff0000> and <glow>
PW.WriteInt32(73, lastlogin ? 1 : 0); // Push the player in the account creation tab
PW.WriteUInt32(75, 0); // I don't know yet what is it
PW.WriteUInt32(79, (UInt32)chartype); // Write the selected character
PW.WriteUInt32(83, 0); // I don't know yet what is it
return block;
}
示例15: WritePacket
public void WritePacket(PacketWriter writer)
{
var count = AllianceRankingList.Count;
for (int i = 0; i < count; i++)
{
var alliance = AllianceRankingList[i];
writer.WriteInt64(alliance.ClanID);
writer.WriteString(alliance.ClanName);
writer.WriteInt32(alliance.Rank);
writer.WriteInt32(alliance.Trophies);
writer.WriteInt32(alliance.LastRank);
writer.WriteInt32(alliance.Unknown1);
writer.WriteInt32(alliance.Members);
writer.WriteInt32(alliance.BadgeID);
writer.WriteInt32(alliance.ClanLevel);
}
}