idz: Wire up team create and load

This commit is contained in:
Tau
2019-11-06 17:28:30 -05:00
parent ec214d5beb
commit a3df4df277
21 changed files with 286 additions and 76 deletions
+15
View File
@@ -0,0 +1,15 @@
import { RequestCode } from "./_defs";
import { CreateAutoTeamRequest } from "../request/createAutoTeam";
import { AimeId } from "../../model";
createAutoTeam.msgCode = 0x007b as RequestCode;
createAutoTeam.msgLen = 0x0010;
export function createAutoTeam(buf: Buffer): CreateAutoTeamRequest {
return {
type: "create_auto_team_req",
aimeId: buf.readUInt32LE(0x0004) as AimeId,
field_0008: buf.readUInt32LE(0x0008),
field_000C: buf.readUInt8(0x000c),
};
}
+2 -2
View File
@@ -3,7 +3,7 @@ import { Transform } from "stream";
import { checkTeamName } from "./checkTeamName";
import { createProfile } from "./createProfile";
import { createTeam } from "./createTeam";
import { joinAutoTeam } from "./joinAutoTeam";
import { createAutoTeam } from "./createAutoTeam";
import { discoverProfile } from "./discoverProfile";
import { load2on2_v1, load2on2_v2 } from "./load2on2";
import { loadConfig } from "./loadConfig";
@@ -54,9 +54,9 @@ export type ReaderFn = ((buf: Buffer) => Request) & {
const funcList: ReaderFn[] = [
checkTeamName,
createAutoTeam,
createProfile,
createTeam,
joinAutoTeam,
discoverProfile,
load2on2_v1,
load2on2_v2,
-14
View File
@@ -1,14 +0,0 @@
import { RequestCode } from "./_defs";
import { JoinAutoTeamRequest } from "../request/joinAutoTeam";
joinAutoTeam.msgCode = 0x007b as RequestCode;
joinAutoTeam.msgLen = 0x0010;
export function joinAutoTeam(buf: Buffer): JoinAutoTeamRequest {
return {
type: "join_auto_team_req",
field_0004: buf.readUInt32LE(0x0004),
field_0008: buf.readUInt32LE(0x0008),
field_000C: buf.readUInt8(0x000c),
};
}