修正死亡后离开游戏, 没有正确上报的bug

This commit is contained in:
zhl 2021-03-10 18:09:52 +08:00
parent d975f564c3
commit 39e2e320be

View File

@ -194,7 +194,7 @@ export class GeneralRoom extends Room {
try {
// 20210310 添加, 如果该玩家已死亡, 则上报下, 清除redis中的锁定键
if (this.state.mode == 1 && !player.robot && player.state == PlayerStateConst.PLAYER_DEAD) {
await leftGame(player.id, this.roomId)
await leftGame(player.accountId, this.roomId)
} else if (consented) {
throw new Error('consented leave')
} else {