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; }