mirror of
https://github.com/djhackersdev/minime.git
synced 2026-08-20 09:24:21 -05:00
Store mileage
This commit is contained in:
@@ -42,6 +42,7 @@ export function saveProfile(buf: Buffer): SaveProfileRequest {
|
||||
exp: buf.readUInt32LE(0x0028),
|
||||
fame: buf.readUInt32LE(0x0468),
|
||||
dpoint: buf.readUInt32LE(0x0464),
|
||||
mileage: buf.readUInt32LE(0x0008),
|
||||
title: buf.readUInt16LE(0x0040) as TitleCode,
|
||||
titles: bitmap(buf.slice(0x0042, 0x00f6)) as TitleCode[],
|
||||
background: buf.readUInt8(0x0750) as BackgroundCode,
|
||||
|
||||
@@ -57,10 +57,11 @@ export function loadProfile2(res: LoadProfileResponse2) {
|
||||
mission(res.missions.team).copy(buf, 0x038a);
|
||||
buf.writeUInt16LE(0xffff, 0x0388); // [1]
|
||||
buf.writeUInt32LE(res.profileId, 0x03b8);
|
||||
buf.writeUInt32LE(res.mileage, 0x03bc);
|
||||
buf.writeUInt16LE(res.settings.music, 0x03c8);
|
||||
buf.writeUInt16LE(res.lv, 0x03cc);
|
||||
buf.writeUInt32LE(res.exp, 0x03d0);
|
||||
buf.writeUInt32LE(res.settings.pack, 0x3d8);
|
||||
buf.writeUInt32LE(res.settings.pack, 0x03d8);
|
||||
buf.writeUInt32LE(res.dpoint, 0x03e8);
|
||||
buf.writeUInt32LE(res.fame, 0x0404);
|
||||
iconv.encode(res.name + "\0", "shift_jis").copy(buf, 0x03ee);
|
||||
|
||||
@@ -22,6 +22,7 @@ export async function createProfile(
|
||||
exp: 0,
|
||||
fame: 0,
|
||||
dpoint: 0,
|
||||
mileage: 0,
|
||||
};
|
||||
|
||||
const missions: MissionState = { team: [], solo: [] };
|
||||
|
||||
@@ -28,6 +28,7 @@ export async function loadProfile(
|
||||
exp: profile.exp,
|
||||
fame: profile.fame,
|
||||
dpoint: profile.dpoint,
|
||||
mileage: profile.mileage,
|
||||
teamId: profile.teamId,
|
||||
settings,
|
||||
chara,
|
||||
|
||||
@@ -16,6 +16,7 @@ export async function saveProfile(
|
||||
exp: req.exp,
|
||||
fame: req.fame,
|
||||
dpoint: req.dpoint,
|
||||
mileage: req.mileage,
|
||||
}),
|
||||
w.chara().save(req.profileId, {
|
||||
...chara,
|
||||
|
||||
@@ -9,4 +9,5 @@ export interface Profile {
|
||||
exp: number;
|
||||
fame: number;
|
||||
dpoint: number;
|
||||
mileage: number;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface SaveProfileRequest {
|
||||
exp: number;
|
||||
fame: number;
|
||||
dpoint: number;
|
||||
mileage: number;
|
||||
title: TitleCode;
|
||||
titles: TitleCode[];
|
||||
background: BackgroundCode;
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface LoadProfileResponse2 {
|
||||
exp: number;
|
||||
fame: number;
|
||||
dpoint: number;
|
||||
mileage: number;
|
||||
teamId?: number;
|
||||
settings: Settings;
|
||||
chara: Chara;
|
||||
|
||||
Reference in New Issue
Block a user