wip update expedition maybe?

This commit is contained in:
Tau
2019-04-02 15:38:07 -04:00
parent 1eaab8aaab
commit bdda290193
6 changed files with 50 additions and 1 deletions

View File

@@ -135,6 +135,13 @@ readers.set(MSG.GET_TEAM_REQ, buf => {
};
});
readers.set(MSG.UPDATE_EXPEDITION_REQ, buf => {
return {
type: "update_expedition_req",
field_0004: buf.readUInt32LE(0x0004),
};
});
readers.set(MSG.UPDATE_PROVISIONAL_STORE_RANK_REQ, buf => {
return {
type: "update_provisional_store_rank_req",

View File

@@ -25,6 +25,8 @@ export const MSG = {
UPDATE_PROVISIONAL_STORE_RANK_RES: 0x0083,
GET_REWARD_TABLE_REQ: 0x0086,
GET_REWARD_TABLE_RES: 0x0087,
UPDATE_EXPEDITION_REQ: 0x008c,
UPDATE_EXPEDITION_RES: 0x008d,
UPDATE_TOPIC_REQ: 0x009a,
UPDATE_TOPIC_RES: 0x009b,
GET_GENERAL_REWARD_REQ: 0x009c,
@@ -53,6 +55,7 @@ REQ_LEN.set(MSG.GET_REWARD_TABLE_REQ, 0x0010);
REQ_LEN.set(MSG.GET_SERVER_LIST_REQ, 0x0020);
REQ_LEN.set(MSG.GET_STOCKER_REQ, 0x0010);
REQ_LEN.set(MSG.GET_TEAM_REQ, 0x0010);
REQ_LEN.set(MSG.UPDATE_EXPEDITION_REQ, 0x0010);
REQ_LEN.set(MSG.UPDATE_PROVISIONAL_STORE_RANK_REQ, 0x0010);
REQ_LEN.set(MSG.UPDATE_RECORD_REQ, 0x0940);
REQ_LEN.set(MSG.UPDATE_STORY_CLEAR_NUM_REQ, 0x0010);

View File

@@ -123,7 +123,12 @@ export class Encoder extends Transform {
case "get_record_v2_res":
buf = Buffer.alloc(0x0d30);
//buf.fill(1, 0x0000, 0x0698); // -------- SPRAYING -----------
//buf.fill(1, 0x01a6, 0x0279); // -------- SPRAYING -----------
for (let i = 0x1a; i < 0x26; i++) {
//buf.writeUInt8(1, 0x0206 + i);
}
buf.writeUInt16LE(MSG.GET_RECORD_V2_RES, 0x0000);
buf.writeUInt32LE(obj.teamId, 4 + 0x3b4);
buf.writeUInt16LE(obj.lv, 4 + 0x03c8);
@@ -174,6 +179,13 @@ export class Encoder extends Transform {
break;
case "update_expedition_res":
buf = Buffer.alloc(0x17c0);
buf.writeUInt16LE(MSG.UPDATE_EXPEDITION_RES, 0x0000);
// in awe of the size of this lad
break;
case "update_provisional_store_rank_res":
buf = Buffer.alloc(0x02b0);
buf.writeUInt16LE(MSG.UPDATE_PROVISIONAL_STORE_RANK_RES, 0x0000);

View File

@@ -174,6 +174,20 @@ export default async function idz(socket: Socket) {
break;
case "update_expedition_req":
if (msg.field_0004 === 0) {
output.write({
type: "generic_res",
status: 0,
});
} else {
output.write({
type: "update_expedition_res",
});
}
break;
case "update_provisional_store_rank_req":
output.write({
type: "update_provisional_store_rank_res",

View File

@@ -94,6 +94,11 @@ export interface GetTeamRequest {
field_0008: number;
}
export interface UpdateExpeditionRequest {
type: "update_expedition_req";
field_0004: number;
}
export interface UpdateProvisionalStoreRankRequest {
type: "update_provisional_store_rank_req";
aimeId: number;
@@ -128,6 +133,7 @@ export type Request =
| GetServerListRequest
| GetStockerRequest
| GetTeamRequest
| UpdateExpeditionRequest
| UpdateProvisionalStoreRankRequest
| UpdateRecordRequest
| UpdateStoryClearNumRequest

View File

@@ -29,6 +29,7 @@ export interface AccountUnlockResponse {
export interface GenericResponse {
type: "generic_res";
status: number;
// a bunch of other stuff here! total size is 0x20
}
export interface CreateTeamResponse extends BaseTeamResponse {
@@ -130,6 +131,11 @@ export interface GetTeamResponse extends BaseTeamResponse {
type: "get_team_res";
}
export interface UpdateExpeditionResponse {
type: "update_expedition_res";
// tera TODO
}
export interface UpdateProvisionalStoreRankResponseRow {
field_0000: number;
field_0004: number;
@@ -168,6 +174,7 @@ export type Response =
| GetServerListResponse
| GetStockerResponse
| GetTeamResponse
| UpdateExpeditionResponse
| UpdateProvisionalStoreRankResponse
| UpdateStoryClearNumResponse
| UpdateTopicResponse;