wip map tiny part of profile load

This commit is contained in:
Tau
2019-11-06 17:28:29 -05:00
parent e85037fd23
commit 3ef8798d64
3 changed files with 14 additions and 1 deletions
+6 -1
View File
@@ -85,6 +85,7 @@ export class Encoder extends Transform {
break;
case "get_record_v1_res":
// Sending this causes an error
buf = Buffer.alloc(0x0c60);
buf.writeUInt16LE(MSG.GET_RECORD_V1_RES, 0x0000);
//iconv.encode("てすと", sjis).copy(buf, 0x03ea);
@@ -93,8 +94,12 @@ export class Encoder extends Transform {
case "get_record_v2_res":
buf = Buffer.alloc(0x0d30);
//buf.fill(1, 0x0000, 0x0698); // -------- SPRAYING -----------
buf.writeUInt16LE(MSG.GET_RECORD_V2_RES, 0x0000);
iconv.encode("てすと", sjis).copy(buf, 0x03ee);
buf.writeUInt16LE(obj.lv, 4 + 0x03c8);
buf.writeUInt32LE(obj.dpoint, 4 + 0x03e4);
buf.writeUInt32LE(obj.fame, 4 + 0x0400);
iconv.encode(obj.name + "\0", sjis).copy(buf, 4 + 0x03ea);
break;
+4
View File
@@ -89,6 +89,10 @@ export default async function idz(socket: Socket) {
case "get_record_req":
output.write({
type: "get_record_v2_res",
name: "てすと",
lv: 69,
fame: 1234,
dpoint: 54321,
});
break;
+4
View File
@@ -52,6 +52,10 @@ export interface GetRecordResponse1 {
export interface GetRecordResponse2 {
type: "get_record_v2_res";
name: string;
lv: number;
fame: number;
dpoint: number;
// giga TODO
}