Commit 4525f1bb authored by Chunchi Che's avatar Chunchi Che

impl sendHsNotReady

parent 232502b5
Pipeline #22934 failed with stages
in 13 minutes and 19 seconds
import { ygopro } from "../../idl/ocgcore";
import { YgoProPacket } from "../packet";
import { CTOS_HS_NOT_READY } from "../protoDecl";
/*
* CTOS HsReady
*
* @usage - 告诉ygopro服务端当前玩家准备完毕
* */
export default class CtosHsReady extends YgoProPacket {
constructor(_: ygopro.YgoCtosMsg) {
super(1, CTOS_HS_NOT_READY, new Uint8Array(0));
}
}
......@@ -6,6 +6,7 @@ export const CTOS_PLAYER_INFO = 16;
export const CTOS_JOIN_GAME = 18;
export const CTOS_UPDATE_DECK = 2;
export const CTOS_HS_READY = 34;
export const CTOS_HS_NOT_READY = 35;
export const CTOS_HS_START = 37;
export const CTOS_HAND_RESULT = 3;
export const CTOS_TP_RESULT = 4;
......
......@@ -9,6 +9,7 @@ import { ygopro } from "./idl/ocgcore";
import Chat from "./ocgAdapter/ctos/ctosChat";
import GameMsgResponse from "./ocgAdapter/ctos/ctosGameMsgResponse/mod";
import HandResult from "./ocgAdapter/ctos/ctosHandResult";
import HsNotReadyAdapter from "./ocgAdapter/ctos/ctosHsNotReady";
import HsReadyAdapter from "./ocgAdapter/ctos/ctosHsReady";
import HsStartAdapter from "./ocgAdapter/ctos/ctosHsStart";
import JoinGameAdapter from "./ocgAdapter/ctos/ctosJoinGame";
......@@ -43,7 +44,12 @@ export function sendHsReady() {
}
export function sendHsNotReady() {
// TODO
const hasNotReady = new ygopro.YgoCtosMsg({
ctos_hs_not_ready: new ygopro.CtosHsNotReady({}),
});
const payload = new HsNotReadyAdapter(hasNotReady).serialize();
socketMiddleWare({ cmd: socketCmd.SEND, payload });
}
export function sendHsStart() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment