Commit 0b982b1f authored by Chunchi Che's avatar Chunchi Che Committed by WANG HE

update idl/ocgcore.ts

parent 506c14e9
This diff is collapsed.
......@@ -18,17 +18,17 @@ export default class CtosHandResultPacket extends ygoProPacket {
const dataView = new DataView(exData.buffer);
switch (hand) {
case ygopro.CtosHandResult.HandType.SCISSORS: {
case ygopro.HandType.SCISSORS: {
dataView.setUint8(0, 1);
break;
}
case ygopro.CtosHandResult.HandType.ROCK: {
case ygopro.HandType.ROCK: {
dataView.setUint8(0, 2);
break;
}
case ygopro.CtosHandResult.HandType.PAPER: {
case ygopro.HandType.PAPER: {
dataView.setUint8(0, 3);
break;
......
......@@ -70,13 +70,13 @@ export function sendJoinGame(ws: WebSocket, version: number, passWd: string) {
}
export function sendHandResult(result: string) {
let hand = ygopro.CtosHandResult.HandType.UNKNOWN;
let hand = ygopro.HandType.UNKNOWN;
if (result === "scissors") {
hand = ygopro.CtosHandResult.HandType.SCISSORS;
hand = ygopro.HandType.SCISSORS;
} else if (result === "rock") {
hand = ygopro.CtosHandResult.HandType.ROCK;
hand = ygopro.HandType.ROCK;
} else if (result === "paper") {
hand = ygopro.CtosHandResult.HandType.PAPER;
hand = ygopro.HandType.PAPER;
}
const handResult = new ygopro.YgoCtosMsg({
......
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