From e85037fd23a4b9ab76a6c2258387eefc07c1595b Mon Sep 17 00:00:00 2001 From: Tau Date: Sun, 31 Mar 2019 23:38:13 -0400 Subject: [PATCH] wip label some create fields --- src/idz/decoder.ts | 8 ++++---- src/idz/request.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/idz/decoder.ts b/src/idz/decoder.ts index ba96308..3f19ddb 100644 --- a/src/idz/decoder.ts +++ b/src/idz/decoder.ts @@ -40,16 +40,16 @@ readers.set(MSG.CREATE_RECORD_REQ, buf => { name: iconv.decode(buf.slice(0x001e, buf.indexOf("\0", 0x001e)), sjis), field_0034: buf.readUInt32LE(0x0034), field_0040: buf.slice(0x0040, 0x0084), - field_0084: buf.readUInt16LE(0x0084), - field_0086: buf.readUInt16LE(0x0086), - field_0088: buf.readUInt16LE(0x0088), + car_type: buf.readUInt16LE(0x0084), + car_color: buf.readUInt16LE(0x0086), + transmission: buf.readUInt16LE(0x0088) === 0 ? "auto" : "manual", field_008A: buf.readUInt16LE(0x008a), field_008C: buf.readUInt16LE(0x008c), field_0090: BigInt(buf.readUInt32LE(0x0090)) | (BigInt(buf.readUInt32LE(0x0094)) << 32n), field_009C: buf.readUInt16LE(0x009c), - field_00A0: buf.readUInt16LE(0x00a0), + gender: buf.readUInt16LE(0x00a0) === 0 ? "male" : "female", field_00A2: buf.readUInt16LE(0x00a2), field_00A4: buf.readUInt16LE(0x00a4), field_00A6: buf.readUInt16LE(0x00a6), diff --git a/src/idz/request.ts b/src/idz/request.ts index 83b1566..34edf95 100644 --- a/src/idz/request.ts +++ b/src/idz/request.ts @@ -18,14 +18,14 @@ export interface CreateRecordRequest { name: string; field_0034: number; field_0040: Buffer; - field_0084: number; - field_0086: number; - field_0088: number; + car_type: number; + car_color: number; + transmission: "auto" | "manual"; field_008A: number; field_008C: number; field_0090: bigint; field_009C: number; - field_00A0: number; + gender: "male" | "female"; field_00A2: number; field_00A4: number; field_00A6: number;