public override void Read(ICsvReader reader) { base.Read(reader); if (this.Version < 8) { reader.Skip(3); } this.Unknown19C = reader.GetShort(); this.Unknown194 = reader.GetShort(); this.Unknown196 = reader.GetShort(); this.Unknown198 = (this.Version >= 16) ? reader.GetShort() : (short)0; this.Unknown19A = (this.Version >= 16) ? reader.GetShort() : (short)0; this.Unknown154 = reader.GetInts(16); this.Unknown14C = (this.Version >= 53) ? reader.GetInt() : 0; this.Unknown150 = (this.Version >= 53) ? reader.GetInt() : 0; this.Unknown120 = reader.GetInt(); this.Unknown124 = reader.GetInt(); this.Unknown128 = (this.Version >= 43) ? reader.GetInt() : -1; this.Unknown12C = (this.Version >= 45) ? reader.GetInt() : 0; this.Unknown140 = reader.GetInt(); this.Unknown134 = (this.Version >= 40) ? reader.GetInt() : this.Unknown140; this.Unknown138 = (this.Version >= 40) ? reader.GetInt() : 0; this.Unknown13C = (this.Version >= 40) ? reader.GetInt() : 0; this.Unknown144 = reader.GetInt(); this.Unknown148 = reader.GetInt(); this.Unknown1C0 = reader.GetInt(); this.Unknown1BC = (this.Version >= 38) ? reader.GetInt() : 0; this.Unknown1A0 = reader.GetShort(); this.Unknown1A2 = (this.Version >= 25) ? reader.GetShort() : (short)0; this.Unknown19E = reader.GetShort(); this.Unknown1A4 = (this.Version >= 36) ? reader.GetShort() : (short)0; this.Unknown1A6 = (this.Version >= 36) ? reader.GetShort() : (short)0; if (this.Version >= 33) { this.Unknown1C4.ReadV3(reader); } else if (this.Version >= 17) { this.Unknown1C4.ReadV2(reader); } else { this.Unknown1C4.ReadV1(reader); } this.Unknown200 = reader.GetInstance <BlobSound>(); this.Unknown1A8 = reader.GetShort(); this.Unknown1AA = reader.GetShort(); this.Unknown130 = (this.Version >= 7) ? reader.GetInt() : 0; this.Unknown1B4 = (this.Version >= 19) ? reader.GetShort() : (short)1; this.Unknown1B6 = (this.Version >= 19) ? reader.GetShort() : (short)1; this.Unknown1AC = (this.Version >= 27) ? reader.GetInt() : 0; this.Unknown1B2 = (this.Version >= 27) ? reader.GetShort() : (short)1; this.Unknown1B0 = (this.Version >= 27) ? reader.GetShort() : (short)1; this.Unknown1B8 = (this.Version >= 27) ? reader.GetShort() : (short)1; this.Unknown1BA = (this.Version >= 27) ? reader.GetShort() : (short)1; if (this.Version < 4) { reader.Skip(8 * 2); } if (this.Version < 3) { this.Unknown1C4.FixBlobId(); this.Unknown200.FixBlobId(); } }
public virtual void Read(ICsvReader reader) { this.Version = reader.GetInt('v'); this.Id = reader.GetInt(); this.Name = reader.GetString(); this.SkillLogic = reader.GetString(); this.Description = reader.GetString(); this.Hitpoints = reader.GetInt(); this.Weight = reader.GetInt(); this.ClassId = this.Version < 31 ? 0 : reader.GetInt(); this.Armors = reader.GetInstances <ArmorValues>(6); this.BarrelLength = reader.GetShort(); this.FireHeight = reader.GetShort(); if (this.Version >= 34) { this.PhysicalRadius = reader.GetShort(); this.TriggerRadius = reader.GetShort(); } else { short dummy = reader.GetShort(); this.PhysicalRadius = dummy; this.TriggerRadius = dummy; if (dummy != -1) { dummy -= 8; this.PhysicalRadius = (dummy >= 1) ? dummy : (short)1; } } if (this.Version >= 11) { this.VehiclePhysicsOwned = reader.GetShort(); this.VehiclePhysicsUnowned = reader.GetShort(); this.WeaponPhysicsOwned = reader.GetShort(); this.WeaponPhysicsUnowned = reader.GetShort(); } else { reader.Skip(); reader.Skip(); } this.LowZ = reader.GetShort(); this.HighZ = reader.GetShort(); this.PickupItemId = reader.GetShort(); this.IsControllable = reader.GetShort(); this.IsWarpable = (this.Version >= 8) ? reader.GetShort() : (short)1; this.EnergyCostPerTick = reader.GetInt(); this.NormalWeight = reader.GetInt(); this.StopWeight = reader.GetInt(); this.DisplayHealth = (this.Version >= 1) ? reader.GetShort() : (short)0; this.InventoryItems = reader.GetInts(6); this.ChildVehicles = reader.GetInts(8); if (this.Version >= 6 && this.Version < 31) { reader.Skip(31); } this.ExplodeItemId = (this.Version >= 17) ? reader.GetShort() : (short)0; this.RadarPrize = (this.Version >= 35) ? reader.GetInt() : -1; this.VehicleGetInMode = (this.Version >= 36) ? reader.GetInt() : 0; this.VisualHeight = (this.Version >= 37) ? reader.GetShort() : (short)0; this.DropItemId = (this.Version >= 46) ? reader.GetShort() : (short)0; this.DropItemQuantity = (this.Version >= 46) ? reader.GetShort() : (short)0; if (this.Version >= 5) { this.Sprites[0].Read(this.Version, reader); this.Sprites[1].Read(this.Version, reader); } this.EnergyMax = (this.Version >= 5) ? reader.GetInt() : -1; this.EnergyRate = (this.Version >= 5) ? reader.GetInt() : -1; this.EnergyMin = (this.Version >= 21) ? reader.GetInt() : -1; this.ThrowTime = (this.Version >= 9) ? reader.GetShort() : (short)-1; if (this.Version >= 9 && this.Version < 24) { reader.Skip(); } this.AllowWeapons = (this.Version >= 9) ? reader.GetShort() : (short)-1; this.Style1BallSpeed = (this.Version >= 9) ? reader.GetShort() : (short)0; this.Style1LowFireAngle = (this.Version >= 9) ? reader.GetShort() : (short)45; this.Style1HighFireAngle = (this.Version >= 9) ? reader.GetShort() : (short)45; this.Style1KeyAssignment = (this.Version >= 15) ? reader.GetShort() : (short)1; this.Style1BallFriction = (this.Version >= 15) ? reader.GetShort() : (short)-1; this.Style2BallSpeed = (this.Version >= 15) ? reader.GetShort() : (short)0; this.Style2LowFireAngle = (this.Version >= 15) ? reader.GetShort() : (short)0; this.Style2HighFireAngle = (this.Version >= 15) ? reader.GetShort() : (short)0; this.Style2KeyAssignment = (this.Version >= 15) ? reader.GetShort() : (short)0; this.Style2BallFriction = (this.Version >= 9) ? reader.GetShort() : (short)1; if (this.Version >= 24) { this.TerrainModifiers = reader.GetShorts(16); } else { for (int i = 0; i < this.TerrainModifiers.Length; i++) { this.TerrainModifiers[i] = -1; } } if (this.Version >= 9 && this.Version < 23) { reader.Skip(); } this.BallCarryRollVehicleItem = (this.Version >= 29) ? reader.GetShort() : (short)0; this.BallCarryArmorVehicleItem = (this.Version >= 29) ? reader.GetShort() : (short)0; this.FlagCarryRollVehicleItem = (this.Version >= 29) ? reader.GetShort() : (short)0; this.FlagCarryArmorVehicleItem = (this.Version >= 29) ? reader.GetShort() : (short)0; this.EventString1 = (this.Version >= 33) ? reader.GetString() : ""; this.EventString2 = (this.Version >= 38) ? reader.GetString() : ""; this.EventString3 = (this.Version >= 38) ? reader.GetString() : ""; this.LosDistance = (this.Version >= 42) ? reader.GetInt() : 0; this.LosAngle = (this.Version >= 42) ? reader.GetInt() : 0; this.LosXRay = (this.Version >= 42) ? reader.GetInt() : 0; this.CombatAwarenessTime = (this.Version >= 42) ? reader.GetInt() : 0; this.SiblingKillsShared = (this.Version >= 42) ? reader.GetShort() : (short)0; this.RelativeId = (this.Version >= 47) ? reader.GetShort() : (short)0; this.DisplayOnFriendlyRadar = (this.Version >= 52) ? reader.GetInt() : 1; this.FriendlyRadarColor = (this.Version >= 50) ? reader.GetInt() : -1; this.DisplayOnEnemyRadar = (this.Version >= 52) ? reader.GetInt() : 1; this.EnemyRadarColor = (this.Version >= 50) ? reader.GetInt() : -1; if (this.Version >= 48) { for (int i = 0; i < 30; i++) { this.HoldItemLimits[i] = reader.GetShort(); this.HoldItemExtendedLimits[i] = reader.GetShort(); } } }