本文整理汇总了C#中Solar.FiestaLib.Networking.Packet.WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteLong方法的具体用法?C# Packet.WriteLong怎么用?C# Packet.WriteLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solar.FiestaLib.Networking.Packet
的用法示例。
在下文中一共展示了Packet.WriteLong方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteDetailedInfoExtra
public void WriteDetailedInfoExtra(Packet packet, bool levelUP = false)
{
if (!levelUP)
{
packet.WriteUShort(this.MapObjectID);
}
packet.WriteLong(this.Exp);
packet.WriteULong(DataProvider.Instance.GetMaxExpForLevel(this.Level));
packet.WriteInt(BaseStats.Strength);
packet.WriteInt(BaseStats.Strength + GetExtraStr());
packet.WriteInt(BaseStats.Endurance);
packet.WriteInt(BaseStats.Endurance + GetExtraEnd());
packet.WriteInt(BaseStats.Dexterity);
packet.WriteInt(BaseStats.Dexterity + GetExtraDex());
packet.WriteInt(BaseStats.Intelligence);
packet.WriteInt(BaseStats.Intelligence + GetExtraInt());
packet.WriteInt(0); // Wizdom. It isn't set in the server so it can contain shit from old buffers... :D
packet.WriteInt(0); // I once had a name here :P
packet.WriteInt(BaseStats.Spirit);
packet.WriteInt(BaseStats.Spirit + GetExtraSpr());
packet.WriteInt(GetWeaponDamage()); //base damage
packet.WriteInt(GetWeaponDamage(true)); //increased damage (e.g. buffs)
packet.WriteInt(GetMagicDamage()); //magic dmg
packet.WriteInt(GetMagicDamage(true)); //inc magic dmg
packet.WriteInt(GetWeaponDefense()); //todo equip stats loading (weapondef)
packet.WriteInt(GetWeaponDefense(true)); //weapondef inc
packet.WriteInt(GetAim()); //TODO: basestats aim + dex?
packet.WriteInt(GetAim(true)); //aim inc (calcuate later based on dex)
packet.WriteInt(GetEvasion()); //evasion
packet.WriteInt(GetEvasion(true)); //evasion inc
packet.WriteInt(GetWeaponDamage()); //damage block again
packet.WriteInt(GetWeaponDamage(true));
packet.WriteInt(GetMagicDamage()); //magic damage
packet.WriteInt(GetMagicDamage(true));
packet.WriteInt(GetMagicDefense()); //magic def
packet.WriteInt(GetMagicDefense(true)); //magic def inc
packet.WriteInt(1);
packet.WriteInt(20);
packet.WriteInt(2);
packet.WriteInt(40);
packet.WriteUInt(BaseStats.MaxHP); //max HP
packet.WriteUInt(BaseStats.MaxSP); //max SP
packet.WriteInt(0); // UNK
packet.WriteInt(BaseStats.MAXSoulHP); // Max HP Stones
packet.WriteInt(BaseStats.MAXSoulSP); // Max SP Stones
packet.Fill(64, 0);
if (!levelUP)
{
packet.WriteInt(this.Position.X);
packet.WriteInt(this.Position.Y);
}
}
示例2: WriteDetailedInfo
public void WriteDetailedInfo(Packet pPacket)
{
pPacket.WriteInt(ID);
pPacket.WriteString(this.Name, 16);
pPacket.WriteByte(this.Slot);
pPacket.WriteByte(this.Level);
pPacket.WriteLong(this.Exp);
pPacket.WriteInt(12345678); // UNK
pPacket.WriteShort(this.StonesHP);
pPacket.WriteShort(this.StonesSP);
pPacket.WriteUInt(this.HP);
pPacket.WriteUInt(this.SP);
pPacket.WriteInt(this.Fame); // Fame
pPacket.WriteLong(this.Money); //TODO: inventory class
pPacket.WriteString(this.Map.MapInfo.ShortName, 12);
pPacket.WriteInt(this.Position.X);
pPacket.WriteInt(this.Position.Y);
pPacket.WriteByte(this.Rotation);
pPacket.WriteByte(this.Str); // Str bonus
pPacket.WriteByte(this.End); // End bonus
pPacket.WriteByte(this.Dex); // Dex bonus
pPacket.WriteByte(this.Int); // Int bonus
pPacket.WriteByte(this.Spr); // Spr bonus
pPacket.WriteShort(0); // UNK
pPacket.WriteUInt(0); // Killpoints
pPacket.Fill(7, 0); // UNK
}