本文整理汇总了C#中System.Utils.WriteInt方法的典型用法代码示例。如果您正苦于以下问题:C# Utils.WriteInt方法的具体用法?C# Utils.WriteInt怎么用?C# Utils.WriteInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Utils
的用法示例。
在下文中一共展示了Utils.WriteInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: serialize
public void serialize(Utils.Objects.Packet sender)
{
// --------------- //
// --- MINIMAL --- //
// --------------- //
sender.WriteInt(_character.Guid);
sender.WriteByte( (byte)_character.Level );
sender.WriteUTF(_character.Name);
// ------------ //
// --- LOOK --- //
// ------------ //
sender.WriteShort(1); // bones ID
sender.WriteShort(1); // nSkins
sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) );
sender.WriteShort((short)5);
for (int i = 0; i < 5; ++i)
sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000);
sender.WriteShort(1); // nScales
sender.WriteShort( (short)140 );
sender.WriteShort(0); // nSubEntities
// ------------ //
// --- BASE --- //
// ------------ //
sender.WriteByte( (byte)_character.Classe );
sender.WriteByte( (byte)_character.Sexe );
}
示例2: serialize
public void serialize(Utils.Objects.Packet sender)
{
sender.WriteInt(_target.Guid);
////// ENTITY LOOK //////
sender.WriteShort(1); // bones ID
sender.WriteShort(1); // nSkins
sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );
sender.WriteShort((short)5);
for (int i = 0; i < 5; ++i)
sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);
sender.WriteShort(1); // nScales
sender.WriteShort( (short)140 );
sender.WriteShort(0); // nSubEntities
////// ENTITY DISPOSITION
sender.WriteShort((short)Types.game.context.EntityDispositionInformations.ProtocolID);
_target.Disposition.serialize(sender);
}
示例3: serialize
public void serialize(Utils.Objects.Packet sender)
{
// MINIMAL INFO
sender.WriteInt(Member.Guid);
sender.WriteByte((byte)Member.Level);
sender.WriteUTF(Member.Name);
// LOOK
sender.WriteShort(1); // bones ID
sender.WriteShort(1); // nSkins
sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe));
sender.WriteShort((short)5);
for (int i = 0; i < 5; ++i)
sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000);
sender.WriteShort(1); // nScales
sender.WriteShort((short)140);
sender.WriteShort(0); // nSubEntities
// PARTY
sender.WriteInt(Member.Characteristics.lifePoints);
sender.WriteInt(Member.Characteristics.maxLifePoints);
sender.WriteShort((short)Member.Characteristics.prospecting.Total);
sender.WriteByte(0); // regenRate
sender.WriteShort((short)Member.Characteristics.initiative.Total);
sender.WriteBool(false); // pvp enabled
sender.WriteByte(0); // alignment side
}
示例4: serialize
public void serialize(Utils.Objects.Packet sender)
{
sender.WriteInt(_target.Guid);
////// ENTITY LOOK //////
sender.WriteShort(1); // bones ID
sender.WriteShort(1); // nSkins
sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );
sender.WriteShort((short)5);
for (int i = 0; i < 5; ++i)
sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);
sender.WriteShort(1); // nScales
sender.WriteShort( (short)140 );
sender.WriteShort(0); // nSubEntities
////// ENTITY DISPOSITION
sender.WriteShort(60); // EntityDisposition id
sender.WriteShort(_target.CurCell);
sender.WriteByte( (byte)_target.Direction );
}
开发者ID:Emudofus,项目名称:Aldos,代码行数:27,代码来源:GameRolePlayActorInformations+(Antoine-PC's+conflicted+copy+2011-02-12).cs
示例5: serialize
public static void serialize(Utils.Objects.Packet sender, Global.Character senderChar, Global.Character targetChar)
{
sender.WriteInt(senderChar.Guid);
sender.WriteUTF(senderChar.Name);
sender.WriteInt(targetChar.Guid);
sender.WriteUTF(targetChar.Name);
}
示例6: serialize
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
{
sender.WriteByte((byte)chan);
sender.WriteUTF(message);
sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
sender.WriteUTF("abcdef"); // fingerprint ???
sender.WriteInt((int)target.Id);
sender.WriteUTF(target.Name);
}
示例7: serialize
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
{
sender.WriteByte((byte)chan);
sender.WriteUTF(message);
sender.WriteInt(Global.Environnement.getInstance().Timestamp);
sender.WriteUTF("abcdef"); // fingerprint ???
sender.WriteInt(target.Guid);
sender.WriteUTF(target.Name);
}
示例8: serialize
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor)
{
sender.WriteByte((byte)chan);
sender.WriteUTF(message);
sender.WriteInt(Global.Environnement.getInstance().Timestamp);
sender.WriteUTF("abcdef");
sender.WriteInt(actor.Guid);
sender.WriteUTF(actor.Name);
sender.WriteInt(actor.AccountID);
}
示例9: serialize
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor)
{
sender.WriteByte((byte)chan);
sender.WriteUTF(message);
sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
sender.WriteUTF(string.Empty);
sender.WriteInt((int)actor.Id);
sender.WriteUTF(actor.Name);
sender.WriteInt((int)actor.Owner.Id);
}
示例10: serialize
public static void serialize(Utils.Objects.Packet sender, int accountId)
{
sender.WriteInt(accountId);
sender.WriteBool(false); // tutorial available
sender.WriteShort(8191); // breeds visible
sender.WriteShort(2047); // breeds available
}
示例11: serialize
public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
{
sender.WriteShort( (short)path.Count );
foreach (int cell in path)
sender.WriteShort((short)cell);
sender.WriteInt(actor.Guid);
}
示例12: serialize
public static void serialize(Utils.Objects.Packet sender, List<int> path, int targetMap)
{
sender.WriteShort( (short)path.Count );
foreach (int cell in path)
sender.WriteCell(cell);
sender.WriteInt(targetMap);
}
示例13: serialize
public static void serialize(Utils.Objects.Packet sender)
{
int nFlags = 0;
sender.WriteShort((short)nFlags);
for (int i = 0; i < nFlags; ++i)
sender.WriteInt(0);
}
示例14: serialize
public static void serialize(Utils.Objects.Packet packet, Global.Character character)
{
packet.WriteUTF(character.Name);
packet.WriteByte((byte)character.Classe);
packet.WriteByte((byte)character.Sexe);
foreach (int color in character.Colors)
packet.WriteInt(color);
}
示例15: serialize
public void serialize(Utils.Objects.Packet sender)
{
// MINIMAL INFO
sender.WriteInt((int)Member.Id);
sender.WriteByte((byte)Member.Level);
sender.WriteUTF(Member.Name);
Member.Look.serialize(sender);
// PARTY
sender.WriteInt(Member.Characteristics.lifePoints);
sender.WriteInt(Member.Characteristics.maxLifePoints);
sender.WriteShort((short)Member.Characteristics.prospecting.Total);
sender.WriteByte(0); // regenRate
sender.WriteShort((short)Member.Characteristics.initiative.Total);
sender.WriteBool(false); // pvp enabled
sender.WriteByte(0); // alignment side
}