idz: Implement team leadership transfer

This commit is contained in:
Tau
2019-11-06 17:28:30 -05:00
parent 3bee10d948
commit 2478bc5ceb
10 changed files with 73 additions and 0 deletions
+4
View File
@@ -29,6 +29,7 @@ import { saveTopic } from "./saveTopic";
import { unlockProfile } from "./unlockProfile";
import { updateProvisionalStoreRank } from "./updateProvisionalStoreRank";
import { updateStoryClearNum } from "./updateStoryClearNum";
import { updateTeamLeader } from "./updateTeamLeader";
import { updateTeamMember } from "./updateTeamMember";
import { Response } from "../response";
@@ -121,6 +122,9 @@ function encode(res: Response): Buffer {
case "update_story_clear_num_res":
return updateStoryClearNum(res);
case "update_team_leader_res":
return updateTeamLeader(res);
case "update_team_member_res":
return updateTeamMember(res);
+10
View File
@@ -0,0 +1,10 @@
import { UpdateTeamLeaderResponse } from "../response/updateTeamLeader";
export function updateTeamLeader(res: UpdateTeamLeaderResponse): Buffer {
const buf = Buffer.alloc(0x0010);
buf.writeUInt16LE(0x008b, 0x0000);
buf.writeUInt32LE(res.status, 0x0004);
return buf;
}