public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { object result = null; XBinHashName HashName = (XBinHashName)value; if (destinationType == typeof(string)) { result = HashName.ToString(); } return(result ?? base.ConvertTo(context, culture, value, destinationType)); }
public CitiesTableItem() { Name = ""; MissionLine = ""; SDSPrefix = ""; TextID = new XBinHashName(); CarGarageType = new XBinHashName(); BoatGarageType = new XBinHashName(); Map = ""; RespawnPlaces = new CityRespawnPlace[0]; Points = new XBinVector2[0]; Polygons = new CityPolygon[0]; }
public void ReadFromFile(BinaryReader reader) { unk0 = reader.ReadUInt32(); uint count0 = reader.ReadUInt32(); uint count1 = reader.ReadUInt32(); uint padding = reader.ReadUInt32(); Items = new CarTrafficTuningItem[count0]; for (int i = 0; i < count1; i++) { CarTrafficTuningItem item = new CarTrafficTuningItem(); item.ID = reader.ReadInt32(); item.CollectionOffset = reader.ReadInt32(); item.CollectionCount1 = reader.ReadInt32(); item.CollectionCount2 = reader.ReadInt32(); item.VehicleID = reader.ReadInt32(); item.VehicleFlags = (ETrafficVehicleFlags_M3)reader.ReadUInt32(); item.VehicleLookFlags = (ETrafficVehicleLookFlags_M3)reader.ReadUInt32(); item.Weight = reader.ReadSingle(); item.Name = XBinHashName.ConstructAndReadFromFile(reader); Items[i] = item; } for (int i = 0; i < count1; i++) { var item = Items[i]; item.TuningItems = new int[item.CollectionCount1]; for (int z = 0; z < item.CollectionCount1; z++) { item.TuningItems[z] = reader.ReadInt32(); } Items[i] = item; } }
public CityPolygon() { Name = ""; TextID = new XBinHashName(); Indexes = new ushort[0]; }
} // Text public LocalisableString() { Unk0 = 0; StringID = new XBinHashName(); Content = ""; }