Skip to content

Commit

Permalink
无导播模式不记录符卡操作和收取
Browse files Browse the repository at this point in the history
  • Loading branch information
linxunan1437 committed Aug 22, 2024
1 parent 782a72c commit ea0a8e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/RoomTypeLink.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ object RoomTypeLink : RoomType {

else -> throw HandlerException("内部错误")
}
SpellLog.logSpellOperate(status, room.spells!![idx], token, gameType = SpellLog.GameType.LINK)
if (room.host.isNotEmpty() && token != Store.robotPlayer.token){
SpellLog.logSpellOperate(status, room.spells!![idx], token, gameType = SpellLog.GameType.LINK)
}
return result
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/RoomTypeNormal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ object RoomTypeNormal : RoomType {
else ->
throw HandlerException("内部错误")
}
// 无导播模式不记录
if (room.host.isEmpty() || token == Store.robotPlayer.token){
return result
}
// 等操作结束后再记录
if (room.startMs > now - room.countDown.toLong() * 1000L) {
// 倒计时没结束,需要按照倒计时已经结束的时间点计算开始收卡的时间
Expand Down

0 comments on commit ea0a8e9

Please sign in to comment.