吃牌后清除吃牌的定时
This commit is contained in:
parent
34a713a8ee
commit
3288cb74a0
@ -51,12 +51,15 @@ export class EatCardCommand extends Command<CardGameState, { client: Client, car
|
||||
this.state.gameState = GameStateConst.STATE_PICK_PET;
|
||||
let time = singleton(GameEnv).playerActTime * 1000 + player.extraTime;
|
||||
let self = this;
|
||||
if (this.room.mainClock && this.room.mainClock.active) {
|
||||
this.room.mainClock.clear();
|
||||
}
|
||||
this.room.mainClock = this.clock.setTimeout(function (){
|
||||
player.extraTime = 0;
|
||||
self.room.mainClock.clear();
|
||||
debugRoom('选随从或者法术时间到, 自动出牌, 自动进入下一轮');
|
||||
self.room.dispatcher.dispatch(new TurnEndCommand());
|
||||
}.bind(this), time);
|
||||
}, time);
|
||||
let fromPlayer = this.state.players.get(this.state.currentTurn);
|
||||
if (fromPlayer.id !== player.id) {
|
||||
this.room.battleMan.onCardLinkReady(player, fromPlayer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user