出牌超时日志增加玩家sessionid

This commit is contained in:
zhl 2021-03-24 16:45:54 +08:00
parent b2659ad6e8
commit ed00f17e21

View File

@ -23,7 +23,7 @@ export function addDrawCardClock(room: Room) {
if (autoDiscard) { if (autoDiscard) {
const client = room.getClient(sessionId) const client = room.getClient(sessionId)
const card = player.cards.values().next().value const card = player.cards.values().next().value
debugRoom('出牌时间到, 自动出牌: ', card.id) debugRoom(`[${sessionId}]出牌时间到, 自动出牌: ${card.id} - ${card.number}`)
if (card.type == CardType.general || card.type == CardType.variable_unit) { if (card.type == CardType.general || card.type == CardType.variable_unit) {
let old: EatCard = null let old: EatCard = null
if (room.state.cards.size > 0) { if (room.state.cards.size > 0) {
@ -46,11 +46,11 @@ export function addDrawCardClock(room: Room) {
dtype: 1 dtype: 1
}) })
} else { } else {
debugRoom('出牌时间到, 玩家没有手牌') debugRoom(`[${sessionId}]出牌时间到, 玩家没有手牌`)
room.dispatcher.dispatch(new TurnEndCommand()) room.dispatcher.dispatch(new TurnEndCommand())
} }
} else { } else {
debugRoom('出牌时间到, 下个玩家开始') debugRoom(`[${sessionId}]出牌时间到, 下个玩家开始`)
room.dispatcher.dispatch(new TurnEndCommand()) room.dispatcher.dispatch(new TurnEndCommand())
} }
} }