idz: Add implicit version field to requests
This commit is contained in:
@@ -8,6 +8,7 @@ export function createAutoTeam(buf: Buffer): CreateAutoTeamRequest {
|
|||||||
return {
|
return {
|
||||||
type: "create_auto_team_req",
|
type: "create_auto_team_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
field_0008: buf.readUInt32LE(0x0008),
|
field_0008: buf.readUInt32LE(0x0008),
|
||||||
field_000C: buf.readUInt8(0x000c),
|
field_000C: buf.readUInt8(0x000c),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function createProfile(buf: Buffer): CreateProfileRequest {
|
|||||||
return {
|
return {
|
||||||
type: "create_profile_req",
|
type: "create_profile_req",
|
||||||
aimeId: buf.readInt32LE(0x0004) as AimeId,
|
aimeId: buf.readInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
luid: readAsciiStr(buf, 0x0008, 0x001e),
|
luid: readAsciiStr(buf, 0x0008, 0x001e),
|
||||||
name: readSjisStr(buf, 0x001e, 0x0034),
|
name: readSjisStr(buf, 0x001e, 0x0034),
|
||||||
field_0034: buf.readUInt32LE(0x0034),
|
field_0034: buf.readUInt32LE(0x0034),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export function createTeam(buf: Buffer): CreateTeamRequest {
|
|||||||
return {
|
return {
|
||||||
type: "create_team_req",
|
type: "create_team_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
teamName: readSjisStr(buf, 0x0008, 0x0028),
|
teamName: readSjisStr(buf, 0x0008, 0x0028),
|
||||||
field_0028: buf.readUInt16LE(0x0028),
|
field_0028: buf.readUInt16LE(0x0028),
|
||||||
field_002C: buf.readUInt32LE(0x002c),
|
field_002C: buf.readUInt32LE(0x002c),
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ export function discoverProfile(buf: Buffer): DiscoverProfileRequest {
|
|||||||
return {
|
return {
|
||||||
type: "discover_profile_req",
|
type: "discover_profile_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export function loadGarage(buf: Buffer): LoadGarageRequest {
|
|||||||
return {
|
return {
|
||||||
type: "load_garage_req",
|
type: "load_garage_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
fetchOffset: buf.readUInt8(0x0008),
|
fetchOffset: buf.readUInt8(0x0008),
|
||||||
field_000A: buf.readUInt16LE(0x000a),
|
field_000A: buf.readUInt16LE(0x000a),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export function loadProfile2(buf: Buffer): LoadProfileRequest2 {
|
|||||||
type: "load_profile_req",
|
type: "load_profile_req",
|
||||||
format: 2,
|
format: 2,
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
luid: readAsciiStr(buf, 0x0008, 0x0020),
|
luid: readAsciiStr(buf, 0x0008, 0x0020),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -25,6 +26,7 @@ export function loadProfile3(buf: Buffer): LoadProfileRequest3 {
|
|||||||
type: "load_profile_req",
|
type: "load_profile_req",
|
||||||
format: 3,
|
format: 3,
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
luid: readAsciiStr(buf, 0x0008, 0x0020),
|
luid: readAsciiStr(buf, 0x0008, 0x0020),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ export function loadStocker(buf: Buffer): LoadStockerRequest {
|
|||||||
return {
|
return {
|
||||||
type: "load_stocker_req",
|
type: "load_stocker_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function loadTeam(buf: Buffer): LoadTeamRequest {
|
|||||||
return {
|
return {
|
||||||
type: "load_team_req",
|
type: "load_team_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004),
|
aimeId: buf.readUInt32LE(0x0004),
|
||||||
|
version: 1,
|
||||||
teamExtId: extId !== 0xffffffff ? (extId as ExtId<Team>) : undefined,
|
teamExtId: extId !== 0xffffffff ? (extId as ExtId<Team>) : undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export function saveNewCar(buf: Buffer): SaveNewCarRequest {
|
|||||||
return {
|
return {
|
||||||
type: "save_new_car_req",
|
type: "save_new_car_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
luid: readAsciiStr(buf, 0x0008, 0x001e),
|
luid: readAsciiStr(buf, 0x0008, 0x001e),
|
||||||
car: car(buf.slice(0x0020, 0x0080)),
|
car: car(buf.slice(0x0020, 0x0080)),
|
||||||
field_0080: buf.readUInt32LE(0x0080),
|
field_0080: buf.readUInt32LE(0x0080),
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export function saveProfile2(buf: Buffer): SaveProfileRequest2 {
|
|||||||
type: "save_profile_req",
|
type: "save_profile_req",
|
||||||
format: 2,
|
format: 2,
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
lv: buf.readUInt16LE(0x0026),
|
lv: buf.readUInt16LE(0x0026),
|
||||||
exp: buf.readUInt32LE(0x0028),
|
exp: buf.readUInt32LE(0x0028),
|
||||||
fame: buf.readUInt32LE(0x0468),
|
fame: buf.readUInt32LE(0x0468),
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export function saveProfile3(buf: Buffer): SaveProfileRequest2 {
|
|||||||
type: "save_profile_req",
|
type: "save_profile_req",
|
||||||
format: 2,
|
format: 2,
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
lv: buf.readUInt16LE(0x0026),
|
lv: buf.readUInt16LE(0x0026),
|
||||||
exp: buf.readUInt32LE(0x0028),
|
exp: buf.readUInt32LE(0x0028),
|
||||||
fame: buf.readUInt32LE(0x04fc),
|
fame: buf.readUInt32LE(0x04fc),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export function saveSettings(buf: Buffer): SaveSettingsRequest {
|
|||||||
return {
|
return {
|
||||||
type: "save_settings_req",
|
type: "save_settings_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
dpoint: buf.readUInt32LE(0x0008),
|
dpoint: buf.readUInt32LE(0x0008),
|
||||||
settings: {
|
settings: {
|
||||||
music: buf.readUInt16LE(0x0002),
|
music: buf.readUInt16LE(0x0002),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export function saveStocker(buf: Buffer): SaveStockerRequest {
|
|||||||
return {
|
return {
|
||||||
type: "save_stocker_req",
|
type: "save_stocker_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
backgrounds: bitmap(buf.slice(0x0008, 0x002c)),
|
backgrounds: bitmap(buf.slice(0x0008, 0x002c)),
|
||||||
selectedCar: buf.readUInt16LE(0x009c) as CarSelector,
|
selectedCar: buf.readUInt16LE(0x009c) as CarSelector,
|
||||||
chara: chara(buf.slice(0x009e, 0x00b2)),
|
chara: chara(buf.slice(0x009e, 0x00b2)),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export function saveTeamBanner(buf: Buffer): SaveTeamBannerRequest {
|
|||||||
return {
|
return {
|
||||||
type: "save_team_banner_req",
|
type: "save_team_banner_req",
|
||||||
teamExtId: buf.readUInt32LE(0x0004) as ExtId<Team>,
|
teamExtId: buf.readUInt32LE(0x0004) as ExtId<Team>,
|
||||||
|
version: 1,
|
||||||
nameBg: buf.readUInt32LE(0x0008),
|
nameBg: buf.readUInt32LE(0x0008),
|
||||||
nameFx: buf.readUInt32LE(0x000c),
|
nameFx: buf.readUInt32LE(0x000c),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ function saveTimeAttack(buf: Buffer): SaveTimeAttackRequest {
|
|||||||
return {
|
return {
|
||||||
type: "save_time_attack_req",
|
type: "save_time_attack_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
dayNight: buf.readUInt8(0x0054) & 1,
|
dayNight: buf.readUInt8(0x0054) & 1,
|
||||||
payload: {
|
payload: {
|
||||||
routeNo: (buf.readUInt8(0x0054) >> 1) as RouteNo,
|
routeNo: (buf.readUInt8(0x0054) >> 1) as RouteNo,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function updateTeamLeader(buf: Buffer): UpdateTeamLeaderRequest {
|
|||||||
return {
|
return {
|
||||||
type: "update_team_leader_req",
|
type: "update_team_leader_req",
|
||||||
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
||||||
|
version: 1,
|
||||||
teamExtId: buf.readUInt32LE(0x0008) as ExtId<Team>,
|
teamExtId: buf.readUInt32LE(0x0008) as ExtId<Team>,
|
||||||
field_000C: readAsciiStr(buf, 0x000c, 0x0020),
|
field_000C: readAsciiStr(buf, 0x000c, 0x0020),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function updateTeamMember(buf: Buffer): UpdateTeamMemberRequest {
|
|||||||
type: "update_team_member_req",
|
type: "update_team_member_req",
|
||||||
action: buf.readUInt8(0x0004) === 0 ? "add" : "remove",
|
action: buf.readUInt8(0x0004) === 0 ? "add" : "remove",
|
||||||
aimeId: buf.readUInt32LE(0x0008) as AimeId,
|
aimeId: buf.readUInt32LE(0x0008) as AimeId,
|
||||||
|
version: 1,
|
||||||
teamExtId: buf.readUInt32LE(0x000c) as ExtId<Team>,
|
teamExtId: buf.readUInt32LE(0x000c) as ExtId<Team>,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface CreateAutoTeamRequest {
|
export interface CreateAutoTeamRequest {
|
||||||
type: "create_auto_team_req";
|
type: "create_auto_team_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
field_0008: number;
|
field_0008: number;
|
||||||
field_000C: number;
|
field_000C: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface CreateProfileRequest {
|
export interface CreateProfileRequest {
|
||||||
type: "create_profile_req";
|
type: "create_profile_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
luid: string;
|
luid: string;
|
||||||
name: string;
|
name: string;
|
||||||
field_0034: number;
|
field_0034: number;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface CreateTeamRequest {
|
export interface CreateTeamRequest {
|
||||||
type: "create_team_req";
|
type: "create_team_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
teamName: string; // len 0x20
|
teamName: string; // len 0x20
|
||||||
field_0028: number; // u16
|
field_0028: number; // u16
|
||||||
field_002C: number; // u32 (but only holds a u8)
|
field_002C: number; // u32 (but only holds a u8)
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ import { AimeId } from "../../../model";
|
|||||||
export interface DiscoverProfileRequest {
|
export interface DiscoverProfileRequest {
|
||||||
type: "discover_profile_req";
|
type: "discover_profile_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface LoadGarageRequest {
|
export interface LoadGarageRequest {
|
||||||
type: "load_garage_req";
|
type: "load_garage_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
fetchOffset: number;
|
fetchOffset: number;
|
||||||
field_000A: number;
|
field_000A: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AimeId } from "../../../model";
|
|||||||
interface LoadProfileRequestBase {
|
interface LoadProfileRequestBase {
|
||||||
type: "load_profile_req";
|
type: "load_profile_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
luid: string;
|
luid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ import { AimeId } from "../../../model";
|
|||||||
export interface LoadStockerRequest {
|
export interface LoadStockerRequest {
|
||||||
type: "load_stocker_req";
|
type: "load_stocker_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ import { Team } from "../model/team";
|
|||||||
export interface LoadTeamRequest {
|
export interface LoadTeamRequest {
|
||||||
type: "load_team_req";
|
type: "load_team_req";
|
||||||
aimeId: number;
|
aimeId: number;
|
||||||
|
version: number;
|
||||||
teamExtId?: ExtId<Team>;
|
teamExtId?: ExtId<Team>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface SaveNewCarRequest {
|
export interface SaveNewCarRequest {
|
||||||
type: "save_new_car_req";
|
type: "save_new_car_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
luid: string;
|
luid: string;
|
||||||
car: Car;
|
car: Car;
|
||||||
field_0080: number;
|
field_0080: number;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { AimeId } from "../../../model";
|
|||||||
interface SaveProfileRequestBase {
|
interface SaveProfileRequestBase {
|
||||||
type: "save_profile_req";
|
type: "save_profile_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
lv: number;
|
lv: number;
|
||||||
exp: number;
|
exp: number;
|
||||||
fame: number;
|
fame: number;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface SaveSettingsRequest {
|
export interface SaveSettingsRequest {
|
||||||
type: "save_settings_req";
|
type: "save_settings_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
dpoint: number; // ?? why
|
dpoint: number; // ?? why
|
||||||
settings: Settings;
|
settings: Settings;
|
||||||
field_0010: number;
|
field_0010: number;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface SaveStockerRequest {
|
export interface SaveStockerRequest {
|
||||||
type: "save_stocker_req";
|
type: "save_stocker_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
selectedCar: CarSelector;
|
selectedCar: CarSelector;
|
||||||
backgrounds: Set<BackgroundCode>;
|
backgrounds: Set<BackgroundCode>;
|
||||||
chara: Chara;
|
chara: Chara;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { Team } from "../model/team";
|
|||||||
export interface SaveTeamBannerRequest {
|
export interface SaveTeamBannerRequest {
|
||||||
type: "save_team_banner_req";
|
type: "save_team_banner_req";
|
||||||
teamExtId: ExtId<Team>;
|
teamExtId: ExtId<Team>;
|
||||||
|
version: number;
|
||||||
nameBg: number;
|
nameBg: number;
|
||||||
nameFx: number;
|
nameFx: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface SaveTimeAttackRequest {
|
export interface SaveTimeAttackRequest {
|
||||||
type: "save_time_attack_req";
|
type: "save_time_attack_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
dayNight: number;
|
dayNight: number;
|
||||||
payload: TimeAttackScore;
|
payload: TimeAttackScore;
|
||||||
field_0002: number; // u16, always 1
|
field_0002: number; // u16, always 1
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { AimeId } from "../../../model";
|
|||||||
export interface UpdateTeamLeaderRequest {
|
export interface UpdateTeamLeaderRequest {
|
||||||
type: "update_team_leader_req";
|
type: "update_team_leader_req";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
teamExtId: ExtId<Team>;
|
teamExtId: ExtId<Team>;
|
||||||
field_000C: string;
|
field_000C: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ export interface UpdateTeamMemberRequest {
|
|||||||
type: "update_team_member_req";
|
type: "update_team_member_req";
|
||||||
action: "add" | "remove";
|
action: "add" | "remove";
|
||||||
aimeId: AimeId;
|
aimeId: AimeId;
|
||||||
|
version: number;
|
||||||
teamExtId: ExtId<Team>;
|
teamExtId: ExtId<Team>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user