diff --git a/src/idz/decoder.ts b/src/idz/decoder.ts index 3f19ddb..58c2da6 100644 --- a/src/idz/decoder.ts +++ b/src/idz/decoder.ts @@ -113,7 +113,7 @@ readers.set(MSG.GET_RECORD_REQ, buf => { readers.set(MSG.GET_STOCKER_REQ, buf => { return { type: "get_stocker_req", - aimeId: buf.readUInt32LE(0x0004), + field_0004: buf.readUInt32LE(0x0004), }; }); @@ -130,7 +130,7 @@ readers.set(MSG.GET_SERVER_LIST_REQ, () => { readers.set(MSG.GET_TEAM_REQ, buf => { return { type: "get_team_req", - field_0004: buf.readUInt32LE(0x0004), + teamId: buf.readUInt32LE(0x0004), field_0008: buf.readUInt32LE(0x0008), }; }); diff --git a/src/idz/encoder.ts b/src/idz/encoder.ts index c3e07e5..d6fbf43 100644 --- a/src/idz/encoder.ts +++ b/src/idz/encoder.ts @@ -88,7 +88,6 @@ export class Encoder extends Transform { // Sending this causes an error buf = Buffer.alloc(0x0c60); buf.writeUInt16LE(MSG.GET_RECORD_V1_RES, 0x0000); - //iconv.encode("てすと", sjis).copy(buf, 0x03ea); break; @@ -96,6 +95,7 @@ export class Encoder extends Transform { buf = Buffer.alloc(0x0d30); //buf.fill(1, 0x0000, 0x0698); // -------- SPRAYING ----------- buf.writeUInt16LE(MSG.GET_RECORD_V2_RES, 0x0000); + buf.writeUInt32LE(obj.teamId, 4 + 0x3b4); buf.writeUInt16LE(obj.lv, 4 + 0x03c8); buf.writeUInt32LE(obj.dpoint, 4 + 0x03e4); buf.writeUInt32LE(obj.fame, 4 + 0x0400); diff --git a/src/idz/index.ts b/src/idz/index.ts index beab226..f7f3b01 100644 --- a/src/idz/index.ts +++ b/src/idz/index.ts @@ -90,6 +90,7 @@ export default async function idz(socket: Socket) { output.write({ type: "get_record_v2_res", name: "てすと", + teamId: 0x11223344, lv: 69, fame: 1234, dpoint: 54321, diff --git a/src/idz/request.ts b/src/idz/request.ts index 34edf95..3db8a0e 100644 --- a/src/idz/request.ts +++ b/src/idz/request.ts @@ -85,12 +85,12 @@ export interface GetServerListRequest { export interface GetStockerRequest { type: "get_stocker_req"; - aimeId: number; + field_0004: number; } export interface GetTeamRequest { type: "get_team_req"; - field_0004: number; + teamId: number; field_0008: number; } diff --git a/src/idz/response.ts b/src/idz/response.ts index 6fbaec8..3340824 100644 --- a/src/idz/response.ts +++ b/src/idz/response.ts @@ -53,6 +53,7 @@ export interface GetRecordResponse1 { export interface GetRecordResponse2 { type: "get_record_v2_res"; name: string; + teamId: number; lv: number; fame: number; dpoint: number;