规范抽卡的下发消息
This commit is contained in:
parent
ed8f89322e
commit
6cce9c9688
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user