优化开箱次数判断

This commit is contained in:
HibiKier
2022-07-23 14:09:17 +08:00
parent 62965fe1df
commit 1f01ba1d10
35 changed files with 511 additions and 507 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ async def open_case(user_qq: int, group: int, case_name: str = "狂牙大行动"
async with db.transaction():
user = await OpenCasesUser.ensure(user_qq, group, for_update=True)
# 一天次数上限
if user.today_open_total == int(
if user.today_open_total > int(
Config.get_config("open_cases", "INITIAL_OPEN_CASE_COUNT")
+ int(impression)
/ Config.get_config("open_cases", "EACH_IMPRESSION_ADD_COUNT")