From 161b5947ffdb688a7061abe528c37fbffc1206ae Mon Sep 17 00:00:00 2001 From: _Dante09 Date: Thu, 10 Aug 2023 02:54:26 -0400 Subject: [PATCH] fix lb6 gacha fp --- libs/GetSubGachaId.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/GetSubGachaId.py b/libs/GetSubGachaId.py index 5d10d87..45fc9ef 100644 --- a/libs/GetSubGachaId.py +++ b/libs/GetSubGachaId.py @@ -8,10 +8,15 @@ def GetGachaSubIdFP(region): response = requests.get(f"https://git.atlasacademy.io/atlasacademy/fgo-game-data/raw/branch/{region}/master/mstGachaSub.json"); gachaList = json.loads(response.text) timeNow = GetTimeStamp() - + priority = 0 + goodGacha = {} for gacha in gachaList: openedAt = gacha["openedAt"] closedAt = gacha["closedAt"] if openedAt <= timeNow & timeNow <= closedAt: - return str(gacha["id"]) \ No newline at end of file + p = int(gacha["priority"]) + if(p > priority): + priority = p + goodGacha = gacha + return str(goodGacha["id"]) \ No newline at end of file