From c3fdcf7a14e7b53aefc508b0d375d62b48130d08 Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 10 Dec 2020 12:58:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BA=BA=E5=B0=B1?= =?UTF-8?q?=E4=BD=8D=E5=90=8E,=20=E5=B0=86=E6=88=BF=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E4=B8=BAprivate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/commands/PlayReadyCommand.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rooms/commands/PlayReadyCommand.ts b/src/rooms/commands/PlayReadyCommand.ts index 7214649..107e524 100644 --- a/src/rooms/commands/PlayReadyCommand.ts +++ b/src/rooms/commands/PlayReadyCommand.ts @@ -11,7 +11,7 @@ export class PlayReadyCommand extends Command { - execute({client}: { client: Client }) { + async execute({client}: { client: Client }) { this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_READY; this.room.broadcast("player_ready_s2c", {player: client.sessionId}, {except: client}); let readyCount = 0; @@ -24,6 +24,7 @@ export class PlayReadyCommand extends Command= this.room.maxClients) { // 比大小, 确定先手 // return [new PrepareCommand()]; + await this.room.setPrivate(true); this.room.state.gameState = GameStateConst.CHANGE_HERO; } From 3031b31024794fdf271a5ac1d94067b70a35d65d Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 10 Dec 2020 13:03:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=87=AA=E5=B7=B1=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E7=89=8C=E4=B9=9F=E8=B0=83=E7=94=A8onCardLinkOver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/commands/DiscardCommand.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rooms/commands/DiscardCommand.ts b/src/rooms/commands/DiscardCommand.ts index a63152d..cfe1ed4 100644 --- a/src/rooms/commands/DiscardCommand.ts +++ b/src/rooms/commands/DiscardCommand.ts @@ -8,6 +8,7 @@ import {singleton} from "../../common/Singleton"; import {GameEnv} from "../../cfg/GameEnv"; import {debugRoom} from "../../common/Debug"; import {TurnEndCommand} from "./TurnEndCommand"; +import {Card} from "../schema/Card"; /** * 出牌 @@ -72,6 +73,8 @@ export class DiscardCommand extends Command