fix: 修正测试中模拟赛马奖励次数检查逻辑
原检查条件错误地减去了1,导致在赛马数量为0时出现负值。 现在直接比较奖励调用次数与赛马数量是否相等。
This commit is contained in:
@@ -341,7 +341,7 @@ async def handle_test_simulate_race(bot: Bot, event: Event):
|
||||
return
|
||||
|
||||
participant_calls = [c for c in fake_points_service.calls if c[0] == "reward_participant"]
|
||||
if len(participant_calls) != max(0, len(room.horses) - 1):
|
||||
if len(participant_calls) != len(room.horses):
|
||||
await test_simulate_race_cmd.send("完全模拟失败:参赛奖励次数不匹配(内存记录)")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user