mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-08 07:01:08 +08:00
Fix: slow retrial for MISSION_OVERVIEW_ACCEPT(_SINGLE)
This commit is contained in:
@@ -198,11 +198,18 @@ class MissionHandler(GlobeOperation, ZoneManager):
|
|||||||
offset=(200, 20), retry_wait=3, additional=self.handle_manjuu,
|
offset=(200, 20), retry_wait=3, additional=self.handle_manjuu,
|
||||||
skip_first_screenshot=True)
|
skip_first_screenshot=True)
|
||||||
|
|
||||||
|
timeout = 5
|
||||||
|
accept_button_timer = Timer(timeout)
|
||||||
|
self.interval_timer[MISSION_OVERVIEW_ACCEPT_SINGLE.name] = accept_button_timer
|
||||||
|
self.interval_timer[MISSION_OVERVIEW_ACCEPT.name] = accept_button_timer
|
||||||
# MISSION_OVERVIEW_CHECK
|
# MISSION_OVERVIEW_CHECK
|
||||||
success = True
|
success = True
|
||||||
for _ in self.loop():
|
for _ in self.loop():
|
||||||
if self.handle_manjuu():
|
# End
|
||||||
continue
|
if self.appear(MISSION_OVERVIEW_EMPTY, offset=(20, 20)):
|
||||||
|
logger.info('No more missions to accept')
|
||||||
|
success = True
|
||||||
|
break
|
||||||
if self.info_bar_count():
|
if self.info_bar_count():
|
||||||
if skip_siren_mission:
|
if skip_siren_mission:
|
||||||
logger.info('Unable to accept missions, '
|
logger.info('Unable to accept missions, '
|
||||||
@@ -212,16 +219,13 @@ class MissionHandler(GlobeOperation, ZoneManager):
|
|||||||
logger.info('Unable to accept missions, because reached the maximum number of missions')
|
logger.info('Unable to accept missions, because reached the maximum number of missions')
|
||||||
success = False
|
success = False
|
||||||
break
|
break
|
||||||
if self.appear(MISSION_OVERVIEW_EMPTY, offset=(20, 20)):
|
|
||||||
logger.info('No more missions to accept')
|
|
||||||
success = True
|
|
||||||
break
|
|
||||||
|
|
||||||
if self.appear_then_click(MISSION_OVERVIEW_ACCEPT, offset=(20, 20), interval=2):
|
if self.handle_manjuu():
|
||||||
self.interval_reset(MISSION_OVERVIEW_ACCEPT_SINGLE)
|
|
||||||
continue
|
continue
|
||||||
if self.appear_then_click(MISSION_OVERVIEW_ACCEPT_SINGLE, offset=(20, 20), interval=2):
|
# Click
|
||||||
self.interval_reset(MISSION_OVERVIEW_ACCEPT)
|
if self.appear_then_click(MISSION_OVERVIEW_ACCEPT, offset=(20, 20), interval=timeout):
|
||||||
|
continue
|
||||||
|
if self.appear_then_click(MISSION_OVERVIEW_ACCEPT_SINGLE, offset=(20, 20), interval=timeout):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# is_in_globe
|
# is_in_globe
|
||||||
|
|||||||
Reference in New Issue
Block a user