idz: Add idz2 decoders
This commit is contained in:
committed by
da5669c09fdb0a288ba01e259a609d7779ac7fc9
parent
4c36e0abf0
commit
2474879c89
@@ -4,10 +4,10 @@ import { CreateProfileRequest } from "../request/createProfile";
|
||||
import { AimeId } from "../../../model";
|
||||
import { readAsciiStr, readSjisStr } from "../../util/bin";
|
||||
|
||||
createProfile.msgCode = 0x0066;
|
||||
createProfile.msgLen = 0x00c0;
|
||||
createProfile1.msgCode = 0x0066;
|
||||
createProfile1.msgLen = 0x00c0;
|
||||
|
||||
export function createProfile(buf: Buffer): CreateProfileRequest {
|
||||
export function createProfile1(buf: Buffer): CreateProfileRequest {
|
||||
return {
|
||||
type: "create_profile_req",
|
||||
aimeId: buf.readInt32LE(0x0004) as AimeId,
|
||||
@@ -19,3 +19,19 @@ export function createProfile(buf: Buffer): CreateProfileRequest {
|
||||
chara: chara(buf.slice(0x00a0, 0x00b4)),
|
||||
};
|
||||
}
|
||||
|
||||
createProfile2.msgCode = 0x0064;
|
||||
createProfile2.msgLen = 0x00c0;
|
||||
|
||||
export function createProfile2(buf: Buffer): CreateProfileRequest {
|
||||
return {
|
||||
type: "create_profile_req",
|
||||
aimeId: buf.readInt32LE(0x0004) as AimeId,
|
||||
version: 2,
|
||||
luid: readAsciiStr(buf, 0x0008, 0x001e),
|
||||
name: readSjisStr(buf, 0x001e, 0x0034),
|
||||
field_0034: buf.readUInt32LE(0x0034),
|
||||
car: car(buf.slice(0x0040, 0x00a0)),
|
||||
chara: chara(buf.slice(0x00a8, 0x00bc)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user