mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Entered _claim_rewards() but no rewards to claim
This commit is contained in:
parent
10e4f49d90
commit
74cf112cbc
@ -180,6 +180,7 @@ class BattlePassUI(UI):
|
||||
def _claim_rewards(self, skip_first_screenshot=True):
|
||||
logger.hr('Claim rewards', level=1)
|
||||
self.battle_pass_goto(KEYWORD_BATTLE_PASS_TAB.Rewards)
|
||||
timeout = Timer(5, count=15).start()
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
@ -192,9 +193,14 @@ class BattlePassUI(UI):
|
||||
if self.appear(CLOSE_CHOOSE_GIFT):
|
||||
logger.info('Got reward but have gift to choose')
|
||||
break
|
||||
if timeout.reached():
|
||||
logger.warning('Claim reward timeout, no rewards to claim')
|
||||
break
|
||||
if self.appear_then_click(REWARDS_CLAIM_ALL, interval=2):
|
||||
timeout.reset()
|
||||
continue
|
||||
|
||||
logger.info('Close reward popup')
|
||||
skip_first_screenshot = True
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
|
Loading…
Reference in New Issue
Block a user