idz: Fix saveGarage processing

This commit is contained in:
b166fe48b91eb09f279b79a4ecf57b2f8f0d3705
2021-02-03 23:43:43 +00:00
committed by da5669c09fdb0a288ba01e259a609d7779ac7fc9
parent ea92e4e981
commit 0937c0fadf
4 changed files with 19 additions and 10 deletions
+7 -4
View File
@@ -1,5 +1,6 @@
import { car } from "./_car";
import { SaveGarageRequest } from "../request/saveGarage";
import { AimeId } from "../../../model";
saveGarage1.msgCode = 0x008e;
saveGarage1.msgLen = 0x0090;
@@ -13,8 +14,9 @@ export function saveGarage1(buf: Buffer): SaveGarageRequest {
return {
type: "save_garage_req",
aimeId: buf.readUInt32LE(0x0004),
payload: car(buf.slice(0x0008, 0x0068)),
version: 1,
aimeId: buf.readUInt32LE(0x0004) as AimeId,
car: car(buf.slice(0x0008, 0x0068)),
field_0068,
field_0080: buf.readUInt8(0x0080),
field_0081: buf.readUInt8(0x0081) !== 0,
@@ -33,8 +35,9 @@ export function saveGarage2(buf: Buffer): SaveGarageRequest {
return {
type: "save_garage_req",
aimeId: buf.readUInt32LE(0x0004),
payload: car(buf.slice(0x0008, 0x0068)),
version: 2,
aimeId: buf.readUInt32LE(0x0004) as AimeId,
car: car(buf.slice(0x0008, 0x0068)),
field_0068,
field_0080: buf.readUInt8(0x0088),
field_0081: buf.readUInt8(0x0089) !== 0,