mirror of
https://github.com/djhackersdev/minime.git
synced 2026-07-09 21:57:43 -05:00
wip profile load ok!
This commit is contained in:
parent
e1d484768c
commit
5a91e332cb
|
|
@ -95,6 +95,13 @@ readers.set(MSG.GET_EXIST_RECORD_REQ, buf => {
|
|||
};
|
||||
});
|
||||
|
||||
readers.set(MSG.GET_GENERAL_REWARD_REQ, buf => {
|
||||
return {
|
||||
type: "get_general_reward_req",
|
||||
field_0004: buf.readUInt32LE(0x0004),
|
||||
};
|
||||
});
|
||||
|
||||
readers.set(MSG.GET_RECORD_REQ, buf => {
|
||||
return {
|
||||
type: "get_record_req",
|
||||
|
|
@ -123,8 +130,8 @@ readers.set(MSG.GET_SERVER_LIST_REQ, () => {
|
|||
readers.set(MSG.GET_TEAM_REQ, buf => {
|
||||
return {
|
||||
type: "get_team_req",
|
||||
aimeId: buf.readUInt32LE(0x0004),
|
||||
teamId: buf.readUInt32LE(0x0008),
|
||||
field_0004: buf.readUInt32LE(0x0004),
|
||||
field_0008: buf.readUInt32LE(0x0008),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ export const MSG = {
|
|||
GET_REWARD_TABLE_RES: 0x0087,
|
||||
UPDATE_TOPIC_REQ: 0x009a,
|
||||
UPDATE_TOPIC_RES: 0x009b,
|
||||
GET_GENERAL_REWARD_REQ: 0x009c,
|
||||
GET_GENERAL_REWARD_RES: 0x009d,
|
||||
GET_CONFIG_DATA_2_REQ: 0x00ab,
|
||||
GET_CONFIG_DATA_2_RES: 0x00ac,
|
||||
GET_STOCKER_REQ: 0x00a7,
|
||||
|
|
@ -45,6 +47,7 @@ REQ_LEN.set(MSG.GET_2ON2_REQ, 0x0010);
|
|||
REQ_LEN.set(MSG.GET_CONFIG_REQ, 0x0050);
|
||||
REQ_LEN.set(MSG.GET_CONFIG_DATA_2_REQ, 0x0010);
|
||||
REQ_LEN.set(MSG.GET_EXIST_RECORD_REQ, 0x0010);
|
||||
REQ_LEN.set(MSG.GET_GENERAL_REWARD_REQ, 0x0010);
|
||||
REQ_LEN.set(MSG.GET_RECORD_REQ, 0x0020);
|
||||
REQ_LEN.set(MSG.GET_REWARD_TABLE_REQ, 0x0010);
|
||||
REQ_LEN.set(MSG.GET_SERVER_LIST_REQ, 0x0020);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,13 @@ export class Encoder extends Transform {
|
|||
|
||||
break;
|
||||
|
||||
case "get_general_reward_res":
|
||||
// A generic response is acceptable too so why even bother with this..
|
||||
buf = Buffer.alloc(0x0330);
|
||||
buf.writeUInt16LE(MSG.GET_GENERAL_REWARD_RES, 0x0000);
|
||||
|
||||
break;
|
||||
|
||||
case "get_record_v1_res":
|
||||
buf = Buffer.alloc(0x0c60);
|
||||
buf.writeUInt16LE(MSG.GET_RECORD_V1_RES, 0x0000);
|
||||
|
|
@ -87,7 +94,7 @@ export class Encoder extends Transform {
|
|||
case "get_record_v2_res":
|
||||
buf = Buffer.alloc(0x0d30);
|
||||
buf.writeUInt16LE(MSG.GET_RECORD_V2_RES, 0x0000);
|
||||
iconv.encode("てすと", sjis).copy(buf, 0x03ea);
|
||||
iconv.encode("てすと", sjis).copy(buf, 0x03ee);
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,15 @@ export default async function idz(socket: Socket) {
|
|||
|
||||
break;
|
||||
|
||||
case "get_general_reward_req":
|
||||
// A non-generic response is also accepted, but why bother?
|
||||
output.write({
|
||||
type: "generic_res",
|
||||
status: 1, // not even checked but let's be consistent
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
case "get_record_req":
|
||||
output.write({
|
||||
type: "get_record_v2_res",
|
||||
|
|
|
|||
|
|
@ -64,6 +64,11 @@ export interface GetExistRecordRequest {
|
|||
aimeId: number;
|
||||
}
|
||||
|
||||
export interface GetGeneralRewardRequest {
|
||||
type: "get_general_reward_req";
|
||||
field_0004: number;
|
||||
}
|
||||
|
||||
export interface GetRecordRequest {
|
||||
type: "get_record_req";
|
||||
aimeId: number;
|
||||
|
|
@ -85,8 +90,8 @@ export interface GetStockerRequest {
|
|||
|
||||
export interface GetTeamRequest {
|
||||
type: "get_team_req";
|
||||
aimeId: number;
|
||||
teamId: number; // guess
|
||||
field_0004: number;
|
||||
field_0008: number;
|
||||
}
|
||||
|
||||
export interface UpdateProvisionalStoreRankRequest {
|
||||
|
|
@ -117,6 +122,7 @@ export type Request =
|
|||
| GetConfigRequest
|
||||
| GetConfigRequest2
|
||||
| GetExistRecordRequest
|
||||
| GetGeneralRewardRequest
|
||||
| GetRecordRequest
|
||||
| GetRewardTableRequest
|
||||
| GetServerListRequest
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ export interface GetExistRecordResponse {
|
|||
result: boolean;
|
||||
}
|
||||
|
||||
export interface GetGeneralRewardResponse {
|
||||
type: "get_general_reward_res";
|
||||
// TODO
|
||||
}
|
||||
|
||||
export interface GetRecordResponse1 {
|
||||
type: "get_record_v1_res";
|
||||
// giga TODO
|
||||
|
|
@ -138,6 +143,7 @@ export type Response =
|
|||
| GetConfigResponse
|
||||
| GetConfigResponse2
|
||||
| GetExistRecordResponse
|
||||
| GetGeneralRewardResponse
|
||||
| GetRecordResponse1
|
||||
| GetRecordResponse2
|
||||
| GetRewardTableResponse
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user