mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-26 01:47:22 -05:00
idz: Add LoadStockerResponse.myChara field
This commit is contained in:
parent
1154414885
commit
7cd819b337
|
|
@ -1,7 +1,7 @@
|
||||||
import { encodeBitmap } from "./_bitmap";
|
import { encodeBitmap } from "./_bitmap";
|
||||||
import { LoadStockerResponse } from "../response/loadStocker";
|
import { LoadStockerResponse } from "../response/loadStocker";
|
||||||
|
|
||||||
export function loadStocker(res: LoadStockerResponse) {
|
export function loadStocker1(res: LoadStockerResponse) {
|
||||||
const buf = Buffer.alloc(0x00a0);
|
const buf = Buffer.alloc(0x00a0);
|
||||||
|
|
||||||
buf.writeInt16LE(0x00a8, 0x0000);
|
buf.writeInt16LE(0x00a8, 0x0000);
|
||||||
|
|
@ -10,3 +10,14 @@ export function loadStocker(res: LoadStockerResponse) {
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function loadStocker2(res: LoadStockerResponse) {
|
||||||
|
const buf = Buffer.alloc(0x00a0);
|
||||||
|
|
||||||
|
buf.writeInt16LE(0x009d, 0x0000);
|
||||||
|
buf.writeUInt8(res.status, 0x0004);
|
||||||
|
encodeBitmap(res.backgrounds, 0x2c).copy(buf, 0x0005);
|
||||||
|
encodeBitmap(res.myChara, 0x98).copy(buf, 0x0031);
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,12 @@ export async function loadStocker(
|
||||||
): Promise<LoadStockerResponse> {
|
): Promise<LoadStockerResponse> {
|
||||||
const profileId = await w.profile().find(req.aimeId, req.version);
|
const profileId = await w.profile().find(req.aimeId, req.version);
|
||||||
const backgrounds = await w.backgrounds().loadAll(profileId);
|
const backgrounds = await w.backgrounds().loadAll(profileId);
|
||||||
|
const myChara = await w.myChara().loadAll(profileId);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: "load_stocker_res",
|
type: "load_stocker_res",
|
||||||
status: 1,
|
status: 1,
|
||||||
backgrounds,
|
backgrounds,
|
||||||
|
myChara,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user