吃别人卡确定吃卡玩家后, 向loser发送失败的消息
This commit is contained in:
parent
1a735bca6d
commit
e3eb6f5a46
@ -57,7 +57,6 @@ export class EatConfirmCommand extends Command<CardGameState, { timeUp: boolean
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 3 种情况直接进入选择随从轮
|
||||
* 1. 下家出牌
|
||||
@ -96,6 +95,13 @@ export class EatConfirmCommand extends Command<CardGameState, { timeUp: boolean
|
||||
}
|
||||
// 成功后广播吃牌成功消息
|
||||
this.room.broadcast('eat_card_s2c', {player: player.id, errocode: 0, errmsg: ''});
|
||||
// 向其他玩家发送吃卡失败的消息
|
||||
for (let [key, val] of tmpActionMap) {
|
||||
if (typeof val != 'number' && key !== player.id) {
|
||||
let client = this.room.getClient(key);
|
||||
client.send('eat_card_s2c', {errcode: 9, errmsg: '吃卡失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user