public int GetSize() { int TotalSize = 32; TotalSize += (Instances.Length * VehicleInstance.GetSize()); return(TotalSize); }
public void ReadFromFile(BinaryReader reader) { uint VehicleOffset = reader.ReadUInt32(); uint NumInstances0 = reader.ReadUInt32(); uint NumInstances1 = reader.ReadUInt32(); Debug.Assert(NumInstances0 == NumInstances1, "Number of instances is incorrect!"); SlotType = (ESlotType)reader.ReadUInt32(); SDSName = XBinCoreUtils.ReadStringPtrWithOffset(reader); QuotaID = XBinCoreUtils.ReadStringPtrWithOffset(reader); GUID = reader.ReadUInt32(); SlotID = reader.ReadUInt32(); Instances = new VehicleInstance[NumInstances0]; for (int i = 0; i < Instances.Length; i++) { VehicleInstance Instance = new VehicleInstance(); Instance.ReadFromFile(reader); Instances[i] = Instance; } }
public Command_LoadVehicle() { Instances = new VehicleInstance[0]; SDSName = ""; QuotaID = ""; }