Begin garage ops
This commit is contained in:
@@ -8,6 +8,7 @@ import { discoverProfile } from "./discoverProfile";
|
||||
import { load2on2 } from "./load2on2";
|
||||
import { loadConfig } from "./loadConfig";
|
||||
import { loadConfig2 } from "./loadConfig2";
|
||||
import { loadGarage } from "./loadGarage";
|
||||
import { loadGeneralReward } from "./loadGeneralReward";
|
||||
import { loadGhost } from "./loadGhost";
|
||||
import { loadProfile } from "./loadProfile";
|
||||
@@ -21,6 +22,7 @@ import { lockProfile } from "./lockProfile";
|
||||
import { msg00AD } from "./msg00AD";
|
||||
import { saveExpedition } from "./saveExpedition";
|
||||
import { saveGarage } from "./saveGarage";
|
||||
import { saveNewCar } from "./saveNewCar";
|
||||
import { saveProfile } from "./saveProfile";
|
||||
import { saveSettings } from "./saveSettings";
|
||||
import { saveStocker } from "./saveStocker";
|
||||
@@ -51,6 +53,7 @@ const funcList: ReaderFn[] = [
|
||||
load2on2,
|
||||
loadConfig,
|
||||
loadConfig2,
|
||||
loadGarage,
|
||||
loadGeneralReward,
|
||||
loadGhost,
|
||||
loadProfile,
|
||||
@@ -66,6 +69,7 @@ const funcList: ReaderFn[] = [
|
||||
msg00AD,
|
||||
saveExpedition,
|
||||
saveGarage,
|
||||
saveNewCar,
|
||||
saveProfile,
|
||||
saveSettings,
|
||||
saveStocker,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { RequestCode } from "./_defs";
|
||||
import { Id } from "../model/base";
|
||||
import { Profile } from "../model/profile";
|
||||
import { LoadGarageRequest } from "../request/loadGarage";
|
||||
|
||||
loadGarage.msgCode = 0x0090 as RequestCode;
|
||||
loadGarage.msgLen = 0x0010;
|
||||
|
||||
export function loadGarage(buf: Buffer): LoadGarageRequest {
|
||||
return {
|
||||
type: "load_garage_req",
|
||||
profileId: buf.readUInt32LE(0x0004) as Id<Profile>,
|
||||
fetchOffset: buf.readUInt8(0x0008),
|
||||
field_000A: buf.readUInt16LE(0x000a),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { car } from "./_car";
|
||||
import { RequestCode } from "./_defs";
|
||||
import { Id } from "../model/base";
|
||||
import { Profile } from "../model/profile";
|
||||
import { SaveNewCarRequest } from "../request/saveNewCar";
|
||||
|
||||
saveNewCar.msgCode = 0x0079 as RequestCode;
|
||||
saveNewCar.msgLen = 0x0090;
|
||||
|
||||
export function saveNewCar(buf: Buffer): SaveNewCarRequest {
|
||||
return {
|
||||
type: "save_new_car_req",
|
||||
profileId: buf.readUInt32LE(0x0004) as Id<Profile>,
|
||||
luid: buf.slice(0x0008, buf.indexOf(0, 0x0008)).toString("ascii"),
|
||||
car: car(buf.slice(0x0020, 0x0080)),
|
||||
field_0080: buf.readUInt32LE(0x0080),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user