From 6cce9c968880292bfb5e11e12c05717c091a3032 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 4 Dec 2020 15:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=8A=BD=E5=8D=A1=E7=9A=84?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/RoomExtMethod.ts | 1 - src/rooms/commands/BeginGameCommand.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rooms/RoomExtMethod.ts b/src/rooms/RoomExtMethod.ts index 8941e7b..969a600 100644 --- a/src/rooms/RoomExtMethod.ts +++ b/src/rooms/RoomExtMethod.ts @@ -62,7 +62,6 @@ Object.defineProperties(Room.prototype, { } let cards = gameUtil.drawCard(this.state.cardQueue, player, count); let client = this.getClient(dstplayer); - client.send('draw_card_s2c', cards); let sData = { player: dstplayer, cards: cards diff --git a/src/rooms/commands/BeginGameCommand.ts b/src/rooms/commands/BeginGameCommand.ts index 02c65a5..5b14c3b 100644 --- a/src/rooms/commands/BeginGameCommand.ts +++ b/src/rooms/commands/BeginGameCommand.ts @@ -18,7 +18,7 @@ export class BeginGameCommand extends Command { for (let client of this.room.clients) { let player = this.state.players.get(client.sessionId); let cards = gameUtil.drawCard(this.state.cardQueue, player, singleton(GameEnv).initCardNum); - this.room.sDrawCard(client, cards); + this.room.sDrawCard(client, {player: client.sessionId, cards}); } this.state.gameState = GameStateConst.STATE_CHANGE_CARD; }