mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-21 00:26:14 +08:00
Fix: Avoid TooManyClickError when receiving lots of missions
This commit is contained in:
@@ -85,6 +85,8 @@ class Reward(UI):
|
|||||||
timeout = Timer(10)
|
timeout = Timer(10)
|
||||||
exit_timer.start()
|
exit_timer.start()
|
||||||
timeout.start()
|
timeout.start()
|
||||||
|
# Record received missions to clear click record
|
||||||
|
clicked_mission = False
|
||||||
|
|
||||||
reward = False
|
reward = False
|
||||||
while 1:
|
while 1:
|
||||||
@@ -98,6 +100,11 @@ class Reward(UI):
|
|||||||
exit_timer.reset()
|
exit_timer.reset()
|
||||||
timeout.reset()
|
timeout.reset()
|
||||||
reward = True
|
reward = True
|
||||||
|
# MISSION_SINGLE -> GET_ITEMS_* means one mission reward received
|
||||||
|
if clicked_mission:
|
||||||
|
logger.info('Got items from mission')
|
||||||
|
self.device.click_record_clear()
|
||||||
|
clicked_mission = False
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for button in [MISSION_MULTI, MISSION_SINGLE]:
|
for button in [MISSION_MULTI, MISSION_SINGLE]:
|
||||||
@@ -105,6 +112,7 @@ class Reward(UI):
|
|||||||
continue
|
continue
|
||||||
if self.match_template_color(button, offset=(20, 200), interval=interval):
|
if self.match_template_color(button, offset=(20, 200), interval=interval):
|
||||||
self.device.click(button)
|
self.device.click(button)
|
||||||
|
clicked_mission = True
|
||||||
exit_timer.reset()
|
exit_timer.reset()
|
||||||
click_timer.reset()
|
click_timer.reset()
|
||||||
timeout.reset()
|
timeout.reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user