add idz repository layer
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import { bitmap } from "./_bitmap";
|
||||
import { chara } from "./_chara";
|
||||
import { RequestCode } from "./_defs";
|
||||
import { BackgroundCode, Id } from "../model/base";
|
||||
import { Profile } from "../model/profile";
|
||||
import { SaveStockerRequest } from "../request/saveStocker";
|
||||
|
||||
saveStocker.msgCode = 0x00a6 as RequestCode;
|
||||
@@ -7,6 +11,8 @@ saveStocker.msgLen = 0x00c0;
|
||||
export function saveStocker(buf: Buffer): SaveStockerRequest {
|
||||
return {
|
||||
type: "save_stocker_req",
|
||||
profileId: buf.readUInt32LE(0x0004),
|
||||
profileId: buf.readUInt32LE(0x0004) as Id<Profile>,
|
||||
backgrounds: bitmap(buf.slice(0x0008, 0x002c)) as BackgroundCode[],
|
||||
chara: chara(buf.slice(0x009e, 0x00b2)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user