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
+17
View File
@@ -0,0 +1,17 @@
import { RequestCode } from "./_defs";
import { ExtId } from "../model/base";
import { Team } from "../model/team";
import { UpdateTeamLeaderRequest } from "../request/updateTeamLeader";
import { AimeId } from "../../model";
updateTeamLeader.msgCode = 0x008a as RequestCode;
updateTeamLeader.msgLen = 0x0020;
export function updateTeamLeader(buf: Buffer): UpdateTeamLeaderRequest {
return {
type: "update_team_leader_req",
aimeId: buf.readUInt32LE(0x0004) as AimeId,
teamExtId: buf.readUInt32LE(0x0008) as ExtId<Team>,
field_000C: buf.slice(0x000c, buf.indexOf("\0", 0x000c)).toString("ascii"),
};
}