示例#1
0
        public int GetSize()
        {
            int TotalSize = 32;

            TotalSize += (Instances.Length * VehicleInstance.GetSize());
            return(TotalSize);
        }
示例#2
0
        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;
            }
        }
示例#3
0
 public Command_LoadVehicle()
 {
     Instances = new VehicleInstance[0];
     SDSName   = "";
     QuotaID   = "";
 }