Add team creation stubs
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { CheckTeamNameResponse } from "../response/checkTeamName";
|
||||
|
||||
export function checkTeamName(res: CheckTeamNameResponse): Buffer {
|
||||
const buf = Buffer.alloc(0x0010);
|
||||
|
||||
buf.writeUInt16LE(0x00a3, 0x0000);
|
||||
buf.writeUInt32LE(res.status, 0x0004);
|
||||
|
||||
return buf;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { CreateTeamResponse } from "../response/createTeam";
|
||||
|
||||
export function createTeam(res: CreateTeamResponse): Buffer {
|
||||
const buf = Buffer.alloc(0x0010);
|
||||
|
||||
buf.writeUInt16LE(0x0072, 0x0000);
|
||||
buf.writeUInt32LE(res.status, 0x0004);
|
||||
buf.writeUInt32LE(res.teamId, 0x0008);
|
||||
|
||||
return buf;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Transform } from "stream";
|
||||
|
||||
import { _team } from "./_team";
|
||||
import { checkTeamName } from "./checkTeamName";
|
||||
import { createTeam } from "./createTeam";
|
||||
import { discoverProfile } from "./discoverProfile";
|
||||
import { generic } from "./generic";
|
||||
import { lockProfile } from "./lockProfile";
|
||||
@@ -27,6 +29,12 @@ import { Response } from "../response";
|
||||
|
||||
function encode(res: Response): Buffer {
|
||||
switch (res.type) {
|
||||
case "check_team_name_res":
|
||||
return checkTeamName(res);
|
||||
|
||||
case "create_team_res":
|
||||
return createTeam(res);
|
||||
|
||||
case "discover_profile_res":
|
||||
return discoverProfile(res);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user