mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-05-04 19:17:33 +08:00
启用gacha
This commit is contained in:
parent
807d5714fb
commit
6a6e8bbfb0
@ -11,7 +11,6 @@ sv_ark_gacha = SV("ark十连")
|
||||
|
||||
@sv_ark_gacha.on_fullmatch(f"{PREFIX}十连")
|
||||
async def send_gacha_info(bot: Bot, ev: Event):
|
||||
return "WIP"
|
||||
user_id = ev.at if ev.at else ev.user_id
|
||||
uid = await ArknightsBind.get_uid_by_game(user_id, ev.bot_id)
|
||||
if uid is None:
|
||||
|
@ -47,14 +47,14 @@ async def gacha(uid: str):
|
||||
gacha=GachaTrackModel(),
|
||||
),
|
||||
)
|
||||
json.dump({"uid": uid, "data": msgjson.decode(msgjson.encode(data))}, f)
|
||||
json.dump({"uid": uid, "data": msgjson.decode(msgjson.encode(data))}, f, indent=4)
|
||||
|
||||
with open(cur_path / Path(f"{uid}.json"), "r") as f:
|
||||
data = json.load(f)
|
||||
data = convert(data["data"], PlayerDataDetail)
|
||||
char_get = await testTenAdvancedGacha("SINGLE_45_0_7", data, 0)
|
||||
with open(cur_path / Path(f"{uid}.json"), "w") as f:
|
||||
json.dump({"uid": uid, "data": msgjson.decode(msgjson.encode(data))}, f)
|
||||
json.dump({"uid": uid, "data": msgjson.decode(msgjson.encode(data))}, f, indent=4)
|
||||
|
||||
return char_get
|
||||
|
||||
|
@ -100,7 +100,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not poolClient.openTime <= now <= poolClient.endTime:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# poolClient.openTime <= now <= poolClient.endTime -> gacha pool not open
|
||||
@ -157,7 +158,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not carousel.startTime <= now <= carousel.endTime or not curPool.openFlag:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# carousel.startTime <= now <= carousel.endTime | openFlag -> gacha pool not open
|
||||
@ -185,7 +187,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not carousel.startTime <= now <= carousel.endTime or not curPool.openFlag:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# carousel.startTime <= now <= carousel.endTime | openFlag -> gacha pool not open
|
||||
@ -219,7 +222,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not poolClient.openTime <= now <= poolClient.endTime:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# poolClient.openTime <= now <= poolClient.endTime -> gacha pool not open
|
||||
@ -249,7 +253,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not poolClient.openTime <= now <= poolClient.endTime:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# poolClient.openTime <= now <= poolClient.endTime -> gacha pool not open
|
||||
@ -310,7 +315,8 @@ class GachaService:
|
||||
state.init = 1
|
||||
|
||||
if not poolClient.openTime <= now <= poolClient.endTime:
|
||||
raise ValueError("gacha pool not open")
|
||||
pass
|
||||
# raise ValueError("gacha pool not open")
|
||||
|
||||
## === ↓ ***基础数据校验*** ↓ ===
|
||||
# poolClient.openTime <= now <= poolClient.endTime -> gacha pool not open
|
||||
|
Loading…
x
Reference in New Issue
Block a user