规范抽卡的下发消息

This commit is contained in:
zhl 2020-12-04 15:13:24 +08:00
parent ed8f89322e
commit 6cce9c9688
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -18,7 +18,7 @@ export class BeginGameCommand extends Command<CardGameState, {}> {
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;
}