Merge branch 'master' into dev

This commit is contained in:
LmeSzinc 2023-11-17 22:25:25 +08:00
commit b542c2a656
6 changed files with 19 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -278,7 +278,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
if isinstance(next_run, datetime) and next_run > limit:
deep_set(self.data, keys=f"{task}.Scheduler.NextRun", value=now)
limit_next_run(['BattlePass'], limit=now + timedelta(days=31, seconds=-1))
limit_next_run(['BattlePass'], limit=now + timedelta(days=40, seconds=-1))
limit_next_run(self.args.keys(), limit=now + timedelta(hours=24, seconds=-1))
def override(self, **kwargs):

View File

@ -47,10 +47,10 @@ MISSIONS_LOADED = ButtonWrapper(
name='MISSIONS_LOADED',
share=Button(
file='./assets/share/battle_pass/MISSIONS_LOADED.png',
area=(1163, 573, 1179, 589),
search=(1143, 553, 1199, 609),
area=(1155, 572, 1171, 588),
search=(1135, 552, 1191, 608),
color=(186, 183, 170),
button=(1163, 573, 1179, 589),
button=(1155, 572, 1171, 588),
),
)
MISSION_PAGE_SCROLL = ButtonWrapper(
@ -77,10 +77,10 @@ OCR_LEVEL = ButtonWrapper(
name='OCR_LEVEL',
share=Button(
file='./assets/share/battle_pass/OCR_LEVEL.png',
area=(183, 93, 240, 134),
search=(163, 73, 260, 154),
color=(90, 79, 60),
button=(183, 93, 240, 134),
area=(167, 103, 249, 143),
search=(147, 83, 269, 163),
color=(134, 119, 94),
button=(167, 103, 249, 143),
),
)
OCR_REMAINING_TIME = ButtonWrapper(
@ -144,10 +144,10 @@ REWARDS_LOADED = ButtonWrapper(
name='REWARDS_LOADED',
share=Button(
file='./assets/share/battle_pass/REWARDS_LOADED.png',
area=(173, 286, 248, 324),
search=(153, 266, 268, 344),
color=(96, 96, 94),
button=(173, 286, 248, 324),
area=(187, 252, 222, 280),
search=(167, 232, 242, 300),
color=(134, 135, 134),
button=(187, 252, 222, 280),
),
)
TODAY_MISSION_CLICK = ButtonWrapper(

View File

@ -73,7 +73,7 @@ class BattlePassQuestOcr(Ocr):
class BattlePassUI(UI):
MAX_LEVEL = 50
MAX_LEVEL = 70
def _battle_pass_wait_rewards_loaded(self, skip_first_screenshot=True):
timeout = Timer(2, count=4).start()
@ -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: