本文整理汇总了C#中Packet.WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteLong方法的具体用法?C# Packet.WriteLong怎么用?C# Packet.WriteLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Packet
的用法示例。
在下文中一共展示了Packet.WriteLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RequestInfo
public static void RequestInfo(TNLConnection conn)
{
var resp = new Packet(Opcode.RequestClanInfoResponse); // todo: No response, if the character has no clan?
resp.WriteInteger(-1); // Clan Id
resp.WriteUtf8StringOn("", 51); // Clan Name
resp.WriteUtf8StringOn("", 251); // Clan Motd
resp.WriteUtf8StringOn("", 51); // Rank One
resp.WriteUtf8StringOn("", 51); // Rank Two
resp.WriteUtf8StringOn("", 51); // Rank Three
resp.WritePadding(1);
resp.WriteInteger(-1); // Monthly Dues
resp.WriteInteger(-1); // Monthly Upkeep
resp.WriteLong(-1L); // Clan Owner
resp.WriteInteger(0); // Num members
resp.WritePadding(4);
for (var i = 0; i < 0; ++i)
{
resp.WriteLong(-1L); // Member Coid
resp.WriteUtf8StringOn("", 17); // Character Name
resp.WritePadding(3);
resp.WriteInteger(0); // Continent Id
resp.WriteInteger(0); // Xp
resp.WriteInteger(0); // Clan Rank
resp.WriteLong(0); // Last Paid Dues
resp.WriteInteger(-1); // Cbid
resp.WriteBoolean(false); // Online
resp.WritePadding(3);
resp.WriteLong(0); // Last Online
resp.WriteLong(0); // Join Date
}
conn.SendPacket(resp, RPCGuaranteeType.RPCGuaranteedOrdered);
}
示例2: GetEnemies
public static void GetEnemies(TNLConnection session)
{
//return;
var coid = session.CurrentCharacter.GetCOID();
CheckCache(coid);
var packet = new Packet(Opcode.GetEnemiesResponse);
var t = Cache[coid];
var enemyEntries = t.Item2.Where(e => e.Type == SocialType.Enemy).ToList();
var count = enemyEntries.Count;
packet.WriteInteger(count >= 20 ? 20 : count);
var j = 0;
foreach (var se in enemyEntries)
{
if (!(se is EnemyEntry)) // should never happen
continue;
packet.WriteLong(se.Character);
packet.WriteLong(se.OtherCharacter);
packet.WriteInteger(se.Level);
packet.WriteInteger(se.LastContinentId);
packet.WriteInteger((se as EnemyEntry).TimesKilled);
packet.WriteInteger((se as EnemyEntry).TimesKilledBy);
packet.WriteByte((se as EnemyEntry).Race);
packet.WriteByte(se.Class);
packet.WriteBoolean(se.Online);
packet.WriteUtf8StringOn(se.Name, 17);
packet.WritePadding(4);
if (++j == 20)
break;
}
for (var i = 0; i < 20 - j; ++i)
packet.WritePadding(56);
session.SendPacket(packet, RPCGuaranteeType.RPCGuaranteedOrdered);
}
示例3: Cash_Shop_Enter
public static Packet Cash_Shop_Enter(Client pClient)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Cash_Shop_Enter);
HelpPacket.AddCharacterInformation(p, pClient.Character);
p.WriteLong(1);
p.WriteInt(0);
p.WriteHexString("67 00 20 00 74 00 68 00 65 00 20 00 73 00 6B 00 69 00 6C 00 6C 00 2C 00 20 00 74 00 68 00 65 00 20 00 6E 00 65 00 61 00 72 00 62 00 79 00 20 00 70 00 72 00 65 00 73 00 65 00 74 00 2D 00 75 00 70 00 20 00 50 00 6F 00 69 00 73 00 6F 00 6E 00 20 00 4D 00 69 00 73 00 74 00 73 00 20 00 65 00 78 00 70 00 6C 00 6F 00 64 00 65 00 2C 00 20 00 64 00 65 00 61 00 6C 00 69 00 6E 00 67 00 20 00 66 00 61 00 74 00 61 00 6C 00 20 00 64 00 61 00 6D 00 61 00 67 00 65 00 20 00 74 00 6F 00 20 00 65 00 6E 00 65 00 6D 00 69 00 65 00 73 00 2E 00 20 00 54 00 68 00 65 00 20 00 64 00 61 00 6D 00 61 00 67 00 65 00 20 00 77 00 69 00 6C 00 6C 00 20 00 69 00 6E 00 63 00 72 00 65 00 61 00 73 00 65 00 20 00 70 00 72 00 6F 00 70 00 6F 00 72 00 74 00 69 00 6F 00 6E 00 61 00 74 00 65 00 20 00 74 00 6F 00 20 00 74 00 68 00 65 00 20 00 6E 00 75 00 6D 00 62 00 65 00 72 00 20 00 6F 00 66 00 20 00 63 00 6F 00 6E 00 74 00 69 00 6E 00 75 00 6F 00 75 00 73 00 20 00 64 00 61 00 6D 00 61 00 67 00 65 00 20 00 65 00 66 00 66 00 65 00 63 00 74 00 73 00 20 00 61 00 70 00 70 00 6C 00 69 00 65 00 64 00 20 00 74 00 6F 00 20 00 74 00 68 00 65 00 20 00 74 00 61 00 72 00 67 00 65 00 74 00 2E 00 20 00 59 00 6F 00 75 00 20 00 63 00 61 00 6E 00 6E 00 6F 00 74 00 20 00 64 00 65 00 74 00 6F 00 6E 00 61 00 74 00 65 00 20 00 4D 00 69 00 73 00 74 00 73 00 20 00 73 00 65 00 74 00 2D 00 75 00 70 00 20 00 62 00 79 00 20 00 6F 00 74 00 68 00 65 00 72 00 73 00 2E 00 20 00 54 00 68 00 65 00 20 00 64 00 61 00 6D 00 61 00 67 00 65 00 20 00 62 00 6F 00 6F 00 73 00 74 00 20 00 61 00 70 00 70 00 6C 00 69 00 65 00 73 00 20 00 75 00 70 00 20 00 74 00 6F 00 20 00 74 00 68 00 65 00 20 00 35 00 74 00 68 00 20 00 65 00 66 00 66 00 65 00 63 00 74 00 2E 00 5C 00 6E 00 52 00 65 00 71 00 75 00 69 00 72 00 65 00 64 00 20 00 53 00 6B 00 69 00 6C 00 6C 00 3A 00 20 00 23 00 63 00 50 00 6F 00 69 00 73 00 6F 00 6E 00 20 00 4D 00 69 00 73 00 74 00 20 00 4C 00 76 00 2E 00 20 00 32 00 30 00 23 00 00 00 49 00 01 48 98 15 5D 0E 34 02 00 00 4D 00 50 00 20 00 43 00 6F 00 73 00 74 00 3A 00 20 00 23 00 6D 00 70 00 43 00 6F 00 6E 00 2C 00 20 00 44 00 61 00 6D 00 61 00 67 00 65 00 3A 00 20 00 23 00 64 00 61 00 6D 00 61 00 67 00 65 00 25 00 2C 00 20 00 4D 00 61 00 78 00 20 00 45 00 6E 00 65 00 6D 00 69 00 65 00 73 00 20 00 48 00 69 00 74 00 3A 00 20 00 23 00 6D 00 6F 00 62 00 43 00 6F 00 75 00 6E 00 74 00 2C 00 20 00 4E 00 75 00 6D 00 62 00 65 00 72 00 20 00 6F 00 66 00 20 00 41 00 74 00 74 00 61 00 63 00 6B 00 73 00 3A 00 20 00 23 00 61 00 74 00 74 00 61 00 63 00 6B 00 43 00 6F 00 75 00 6E 00 74 00 2C 00 20 00 44 00 61 00 6D 00 61 00 67 00 65 00 20 00 4F 00 76 00 65 00 72 00 20 00 54 00 69 00 6D 00 65 00 3A 00 20 00 23 00 64 00 6F 00 74 00 25 00 20 00 64 00 61 00 6D 00 61 00 67 00 65 00 20 00 65 00 76 00 65 00 72 00 79 00 20 00 23 00 64 00 6F 00 74 00 49 00 6E 00 74 00 65 00 72 00 76 00 61 00 6C 00 20 00 73 00 65 00 63 00 20 00 66 00 6F 00 72 00 20 00 23 00 64 00 6F 00 74 00 54 00 69 00 6D 00 65 00 20 00 73 00 65 00 63 00 2C 00 20 00 46 00 72 00 65 00 65 00 7A 00 65 00 20 00 43 00 68 00 61 00 6E 00 63 00 65 00 3A 00 20 00 23 00 68 00 63 00 50 00 72 00 6F 00 70 00 25 00 2C 00 20 00 46 00 72 00 65 00 65 00 7A 00 65 00 20 00 44 00 75 00 72 00 61 00 74 00 69 00 6F 00 6E 00 3A 00 20 00 00 00 00 00 00 00 00 A1 00 00 00 00 10 57 68 63 2B B8 CE 01");
return p;
}
示例4: MissionsRequest
public static void MissionsRequest(TNLConnection conn)
{
var resp = new Packet(Opcode.ConvoyMissionsResponse);
resp.WritePadding(4);
resp.WriteLong(-1L); // Member coid
resp.WriteShort(0); // Mission Num
resp.WritePadding(6);
for (var i = 0; i < 0; ++i)
resp.WriteShort(0);
conn.SendPacket(resp, RPCGuaranteeType.RPCGuaranteedOrdered);
}
示例5: ConstructBroadcastPacket
private static Packet ConstructBroadcastPacket(ChatType type, Boolean isGm, String sender, Int64 sendercoid, String msg)
{
var msglen = (Int16) msg.Length;
var p = new Packet(Opcode.Broadcast);
p.WriteInteger((UInt32) type);
p.WriteLong(sendercoid);
p.WriteBoolean(isGm);
p.WritePadding(1).WriteShort(msglen);
p.WriteUtf8StringOn(sender, 17);
p.WriteUtf8StringOn(msg, msglen);
p.WriteByte(0);
return p;
}
示例6: AddMonsterStatus
public static void AddMonsterStatus(Packet pPacket, Mob pMob)
{
pPacket.WriteByte(0);
pPacket.WriteZero(40);
pPacket.WriteShort(5088);
pPacket.WriteShort(72);
pPacket.WriteZero(3);
pPacket.WriteByte(136);
for (int i = 0; i < 4; i++)
{
pPacket.WriteLong(0);
pPacket.WriteHexString("30 3B");
}
pPacket.WriteZero(7);
pPacket.WriteZero(12);
}
示例7: GetIgnored
public static void GetIgnored(TNLConnection session)
{
//return;
var coid = session.CurrentCharacter.GetCOID();
CheckCache(coid);
var packet = new Packet(Opcode.GetIgnoredResponse);
var t = Cache[coid];
var ignoredEntries = t.Item2.Where(e => e.Type == SocialType.Ignore).ToList();
var count = ignoredEntries.Count;
packet.WriteInteger(count >= 20 ? 20 : count);
var j = 0;
foreach (var se in ignoredEntries)
{
packet.WriteLong(se.OtherCharacter);
if (++j == 20)
break;
}
for (var i = 0; i < 20 - j; ++i)
packet.WritePadding(8);
packet.WriteUtf8StringOn("", 17);
packet.WritePadding(7);
session.SendPacket(packet, RPCGuaranteeType.RPCGuaranteedOrdered);
}
示例8: WritePacket
public void WritePacket(Packet packet)
{
//packet.WritePadding(4);
// SVOG header begin -->
packet.WriteInteger(0); // Region Id
packet.WriteInteger(0); // Region Type
packet.WriteByte(1); // Region Level
packet.WritePadding(3);
packet.WriteInteger(0); // Layer Id
packet.WriteInteger(_continentObject.Objective); // Objective Index
packet.WriteUtf8StringOn(String.Format("{0}.fam", _continentObject.MapFileName), 65); // Map Name
packet.WriteBoolean(_continentObject.IsTown); // Is Town
packet.WriteBoolean(_continentObject.IsArena); // Is Arena
packet.WritePadding(1);
packet.WriteInteger(_continentObject.OwningFaction); // Race Faction
packet.WriteInteger(ContinentId); // Continent Object ID
packet.WriteBoolean(_continentObject.IsPersistent); // Is Persistent
packet.WritePadding(3);
packet.WriteInteger(MapEntry.IterationVersion); // Map Iteration Version
packet.WriteInteger(_continentObject.ContestedMission); // Contested Mission Id
packet.WritePadding(4);
packet.WriteLong(ContinentId); // COID Map
// SVOG header end <--
packet.WriteInteger(123456789); // Temporal Random Seed
packet.WriteLong(ContinentId); // COID Map
packet.WriteShort(0); // Number of Module Selections
// for NumberOfModuleSelections { 24 byte }
// CND Unaligned Vector 3 begin -->
packet.WriteSingle(0.0f);
packet.WriteSingle(0.0f);
packet.WriteSingle(0.0f);
// CND Unaligned Vector 3 end <--
packet.WriteShort(0);
/*packet.WriteShort(36); // Weather Count
// Weather Update begin -->
packet.WriteInteger(0x2069);
packet.WriteLong(0);
packet.WriteLong(0);
packet.WriteLong(0);
packet.WriteLong(0);*/
// Weather Update end <--
}
示例9: WriteToCreatePacket
public override void WriteToCreatePacket(Packet packet, Boolean extended = false)
{
packet.WriteInteger(CBID);
packet.WriteLong(-1L); // coid Store
packet.WriteInteger(GetCurrentHP() + 100);
packet.WriteInteger(GetMaximumHP() + 100);
packet.WriteInteger(GetValue());
packet.WriteInteger(GetIDFaction());
packet.WriteInteger(TeamFaction);
packet.WriteInteger(CustomValue);
for (var i = 0; i < 5; ++i) // prefix id
packet.WriteInteger(-1);
for (var i = 0; i < 5; ++i) // gadget id
packet.WriteInteger(-1);
for (var i = 0; i < 5; ++i) // prefix level
packet.WriteShort(0);
for (var i = 0; i < 5; ++i) // gadget level
packet.WriteShort(0);
packet.WriteSingle(Position.X);
packet.WriteSingle(Position.Y);
packet.WriteSingle(Position.Z);
packet.WriteSingle(Rotation.X);
packet.WriteSingle(Rotation.Y);
packet.WriteSingle(Rotation.Z);
packet.WriteSingle(Rotation.W);
packet.WriteSingle(Scale);
packet.WriteInteger(GetQuantity());
packet.WriteByte(InventoryPositionX);
packet.WriteByte(InventoryPositionY);
packet.WriteBoolean(GetIsCorpse()); // is corpse
packet.WritePadding(5);
packet.WriteTFID(COID);
packet.WriteBoolean(false); // will equip
packet.WriteBoolean(false); // is item link
packet.WriteBoolean(false); // is in inventory
packet.WriteByte(SkillLevel1);
packet.WriteByte(SkillLevel2);
packet.WriteByte(SkillLevel3);
packet.WriteBoolean(false); // is identified
packet.WriteBoolean(false); // possible mission item
packet.WriteBoolean(false); // tempitem
packet.WriteBoolean((UnkFlags & UnkFlags.IsKit) != 0);
packet.WriteBoolean(false); // isinfinite
packet.WriteBoolean((UnkFlags & UnkFlags.IsBound) != 0);
packet.WriteShort(UsesLeft);
packet.WriteUtf8StringOn(CustomizedName, 17);
packet.WriteBoolean(MadeFromMemory);
packet.WriteBoolean(false); // is mail
packet.WritePadding(1);
packet.WriteShort((Int16)MaxGadgets);
packet.WriteShort((Int16)RequiredLevel);
packet.WriteShort((Int16)RequiredCombat);
packet.WriteShort((Int16)RequiredPerception);
packet.WriteShort((Int16)RequiredTech);
packet.WriteShort((Int16)RequiredTheory);
packet.WritePadding(2);
packet.WriteInteger(ItemTemplateId);
packet.WritePadding(4);
}
示例10: EnterField
public static Packet EnterField(Character pCharacter)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Field_Enter);
p.WriteShort(2);
p.WriteLong(1);
p.WriteLong(2);
p.WriteLong(pCharacter.Client.Channel);
p.WriteByte(pCharacter.PortalCount);
p.WriteByte(2);
p.WriteBytes(new byte[8]);
p.WriteInt(pCharacter.MapId);
p.WriteByte(pCharacter.MapPosition);
p.WriteInt(pCharacter.HP);
p.WriteByte(0);
p.WriteLong(Tools.GetTime(Tools.CurrentTimeMillis()));
p.WriteInt(100);
p.WriteShort(0);
p.WriteByte(1);
return p;
}
示例11: AddExpirationTime
public static void AddExpirationTime(Packet p, long time)
{
p.WriteLong(Tools.GetTime(time));
}
示例12: AddEquipInfo
public static void AddEquipInfo(Packet p, Equip equip, Character c)
{
p.WriteByte(1); // Item type. 2 - An item, 3 - A pet. TODO: Pets.
p.WriteInt(equip.ItemID);
p.WriteByte(0); // todo: unique id.
AddExpirationTime(p, equip.Expiration);
p.WriteByte(0); // TODO: Extended slots.
p.WriteInt(0); // All values of all stats.
p.WriteByte(equip.Slots);
p.WriteByte(equip.Level);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteShort(equip.Str);
p.WriteByte(0); // Inc skills?
p.WriteByte(equip.ItemLevel);
p.WriteInt(equip.ItemEXP * 100000);
p.WriteInt(0); // Durability.
p.WriteInt(equip.ViciousHammer);
p.WriteShort(0); // PVP Damage.
p.WriteInt(4);
p.WriteByte(0xFF);
p.WriteMapleString(""); // Owner.
p.WriteByte(0); // State.
p.WriteByte(0); // Enhance.
p.WriteShort(0); // ptl1
p.WriteShort(0); // ptl2
p.WriteShort(0); // ptl3
p.WriteShort(0); // bonus ptl 1
p.WriteShort(0); // bonus ptl2
p.WriteShort(0);
p.WriteShort(0);
p.WriteShort(0); // socket state
p.WriteShort(0); // socket1
p.WriteShort(0); // socket 2
p.WriteShort(0); // socket 3
//if (equip.CashId > 0)
//p.writelong
p.WriteLong(Tools.GetTime(-2));
p.WriteInt(-1);
}
示例13: AddCharacterStats
public static void AddCharacterStats(Packet pPacket, Character pCharacter)
{
pCharacter.Subcategory = Constants.JobConstants.GetSubcategory(pCharacter.Job);
pPacket.WriteInt(pCharacter.Id);
pPacket.WritePaddedString(pCharacter.Name, 13);
pPacket.WriteByte(pCharacter.Gender);
pPacket.WriteByte(pCharacter.SkinColor);
pPacket.WriteInt(pCharacter.FaceId);
pPacket.WriteInt(pCharacter.HairId);
pPacket.WriteZero(24);
pPacket.WriteByte(pCharacter.Level);
pPacket.WriteShort(pCharacter.Job);
pPacket.WriteShort(pCharacter.Str);
pPacket.WriteShort(pCharacter.Dex);
pPacket.WriteShort(pCharacter.Int);
pPacket.WriteShort(pCharacter.Luk);
pPacket.WriteInt(pCharacter.HP);
pPacket.WriteInt(pCharacter.MaxHP);
pPacket.WriteInt(pCharacter.MP);
pPacket.WriteInt(pCharacter.MaxMP);
pPacket.WriteShort(pCharacter.AP);
if (Constants.JobConstants.isSeparatedSp(pCharacter.Job))
{
byte length = (byte)pCharacter.SP.Count((b) => b > 0);
pPacket.WriteByte(length);
foreach (int i in pCharacter.SP)
{
if (i > 0)
{
pPacket.WriteByte((byte)(i + 1));
pPacket.WriteInt(pCharacter.SP[i]);
}
}
}
else
{
pPacket.WriteShort(pCharacter.SP[0]);
}
pPacket.WriteLong(pCharacter.EXP);
pPacket.WriteInt(pCharacter.Fame);
pPacket.WriteShort(0); // Migration Data, v141.
pPacket.WriteShort(-1800); // Migration Data, v141.
pPacket.WriteInt(0); // Gachapon EXP.
pPacket.WriteInt(pCharacter.MapId);
pPacket.WriteByte(pCharacter.MapPosition);
pPacket.WriteInt(0);
pPacket.WriteShort(pCharacter.Subcategory);
if (Constants.JobConstants.isDemonAvenger(pCharacter.Job) || Constants.JobConstants.isDemonSlayer(pCharacter.Job) || Constants.JobConstants.isXenon(pCharacter.Job))
pPacket.WriteInt(pCharacter.FaceMarking);
pPacket.WriteByte(pCharacter.Fatigue);
pPacket.WriteInt(Constants.GetCurrentDate());
pPacket.WriteInt(pCharacter.Ambition);
pPacket.WriteInt(pCharacter.Insight);
pPacket.WriteInt(pCharacter.Willpower);
pPacket.WriteInt(pCharacter.Diligence);
pPacket.WriteInt(pCharacter.Empathy);
pPacket.WriteInt(pCharacter.Charm);
pPacket.WriteZero(13);
pPacket.WriteLong(Tools.GetTime(Tools.CurrentTimeMillis()));
pPacket.WriteInt(pCharacter.BattleEXP);
pPacket.WriteByte(pCharacter.BattleRank);
pPacket.WriteInt(pCharacter.BattlePoints);
pPacket.WriteByte(5);
pPacket.WriteByte(6);
pPacket.WriteByte(0);
pPacket.WriteInt(0);
pPacket.WriteBytes(new byte[] { 59, 55, 79, 1, 0, 64 });
pPacket.WriteSByte(-32);
pPacket.WriteSByte(-3);
pPacket.WriteShort(0);
pPacket.WriteZero(3);
for (int i = 0; i < 9; i++)
{
pPacket.WriteInt(0);
pPacket.WriteByte(0);
pPacket.WriteInt(0);
}
pPacket.WriteReversedLong(Tools.GetTime(Tools.CurrentTimeMillis()));
}
示例14: WriteToCreatePacket
public override void WriteToCreatePacket(Packet packet, Boolean extended = false)
{
base.WriteToCreatePacket(packet);
if (extended || this is Character) // only chars and vehicles can be extended
return;
packet.WriteInteger(EnhancementId);
packet.WritePadding(4);
packet.WriteTFID(SummonOwner);
packet.WriteBoolean(DoesntCountAsSummon);
packet.WritePadding(7);
packet.WriteLong(CurrentVehicleId);
packet.WriteLong(CurrentTrailerCoid);
packet.WriteInteger(-1); // current spawn owner
packet.WriteByte(0); // number skills
packet.WritePadding(3);
packet.WriteInteger(Analyzed);
packet.WriteInteger(Level);
packet.WriteInteger(0); // current path id
packet.WriteInteger(0); // extra path id
packet.WriteSingle(0.0f); // patrol distance
packet.WriteBoolean(false); // path is reversing
packet.WriteBoolean(false); // path is road
packet.WriteBoolean(IsElite); // iselite
packet.WriteByte(AIState); // ai state
packet.WriteInteger(0); // on use trigger
packet.WriteInteger(0); // on use reaction
packet.WriteLong(0); // murderer coid
for (var i = 0; i < 255; ++i)
{
packet.WriteInteger(0); // skill id
packet.WriteShort(0); // skill level
packet.WritePadding(2);
}
}
示例15: WriteToCreatePacket
public override void WriteToCreatePacket(Packet packet, Boolean extended = false)
{
base.WriteToCreatePacket(packet, extended);
#region Create Vehicle
packet.WriteLong(CoidCurrentOwner); // current owner coid
packet.WriteInteger(SpawnOwnerCoid); // spawn owner coid
for (var i = 0; i < 8; ++i) // arr id tricks
packet.WriteInteger(TrickIds[i]);
packet.WriteInteger(PrimaryColor); // color primary
packet.WriteInteger(SecondaryColor); // color secondary
packet.WriteShort(_armorAdd); // armor add
packet.WritePadding(2);
packet.WriteInteger(_powerMaxAdd); // power max add
packet.WriteInteger(_heatMaxAdd); // heat max add
packet.WriteShort(_cooldownAdd); // cooldownadd
packet.WriteShort(_inventorySlots); // inventoryslots
packet.WriteSingle(_maxWtWeaponFront); // max wt weapon front
packet.WriteSingle(_maxWtWeaponTurret); // max wt weapon turret
packet.WriteSingle(_maxWtWeaponRear); // max wt weapon rear
packet.WriteSingle(_maxWtArmor); // max wt armor
packet.WriteSingle(_maxWtPowerPlant); // max wt power plant
packet.WriteSingle(SpeedAdd); // speed add
packet.WriteSingle(BrakesMaxTorqueFrontMultiplier); // brakes max torque front multiplier
packet.WriteSingle(BrakesMaxTorqueRearAdjustMultiplier); // brakes max torque rear adjust multiplies
packet.WriteSingle(SteeringMaxAngleMultiplier); // steering max angle multiplier
packet.WriteSingle(SteeringFullSpeedLimitMultiplier); // steering full speed limit multiplier
packet.WriteSingle(AVDNormalSpinDampeningMultiplier); // AVD normal spin dampening multiplier
packet.WriteSingle(AVDCollisionSpinDampeningAdjust); // AVD collision spin dampening multiplier
packet.WriteSingle(_kmTravelled); // km travelled
packet.WriteBoolean(IsTrailer); // is trailer
packet.WriteBoolean(false); // is in inventory
packet.WriteBoolean(VehicleIsActive); // is active
packet.WriteByte(Trim); // trim
packet.WritePadding(4);
#region Ornament
packet.WriteOpcode(Opcode.CreateSimpleObject);
if (_ornament != null) // Ornament
_ornament.WriteToCreatePacket(packet, extended);
else
WriteEmptyObjectToPacket(packet);
#endregion
#region Race Item
packet.WriteOpcode(Opcode.CreateSimpleObject);
if (_raceItem != null && !TNLInterface.Instance.Adaptive) // Race Item
_raceItem.WriteToCreatePacket(packet, extended);
else
WriteEmptyObjectToPacket(packet);
#endregion
#region Power Plant
packet.WriteOpcode(Opcode.CreatePowerPlant);
if (_powerPlant != null) // Power Plant
_powerPlant.WriteToCreatePacket(packet);
else
PowerPlant.WriteEmptyObjectToPacket(packet);
#endregion
#region Wheel Set
packet.WriteOpcode(Opcode.CreateWheelSet);
if (_wheelSet != null) // Wheel set
_wheelSet.WriteToCreatePacket(packet);
else
Debug.Assert(false, "WHEELSETNEK KELL LENNIE!");
#endregion
#region Armor
packet.WriteOpcode(Opcode.CreateArmor);
if (_armor != null) // Armor
_armor.WriteToCreatePacket(packet);
else
Armor.WriteEmptyObjectToPacket(packet);
#endregion
#region Melee Weapon
packet.WriteOpcode(Opcode.CreateWeapon);
if (_meleeWeapon != null) // Weapon Melee
_meleeWeapon.WriteToCreatePacket(packet);
else
Weapon.WriteEmptyObjectToPacket(packet);
#endregion
#region Front Weapon
packet.WriteOpcode(Opcode.CreateWeapon);
if (_weapons[0] != null) // Weapon Front
_weapons[0].WriteToCreatePacket(packet);
//.........这里部分代码省略.........