From c94176fbd2bb4f839f1c8983dbdcab7e17a7d670 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:53:10 +0800 Subject: [PATCH] Opt: Clear interval before and after synthesize_confirm() --- tasks/item/synthesize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/item/synthesize.py b/tasks/item/synthesize.py index 60f0ff3c6..aebc2d64d 100644 --- a/tasks/item/synthesize.py +++ b/tasks/item/synthesize.py @@ -387,6 +387,7 @@ class Synthesize(CombatObtain, ItemUI): out: page_synthesize, SYNTHESIZE_CONFIRM """ logger.hr('Synthesize confirm') + self.interval_clear([SYNTHESIZE_CONFIRM, page_synthesize.check_button]) def appear_confirm(): return self.image_color_count(SYNTHESIZE_CONFIRM, color=(226, 229, 232), threshold=221, count=1000) @@ -404,6 +405,7 @@ class Synthesize(CombatObtain, ItemUI): break # Click if self.handle_popup_confirm(): + self.interval_reset(page_synthesize.check_button) continue if appear_confirm() and self.ui_page_appear(page_synthesize, interval=2): self.device.click(SYNTHESIZE_CONFIRM) @@ -425,6 +427,8 @@ class Synthesize(CombatObtain, ItemUI): if self.handle_reward(click_button=SYNTHESIZE_MINUS): continue + self.interval_clear([SYNTHESIZE_CONFIRM, page_synthesize.check_button]) + def synthesize_exit(self, skip_first_screenshot=True): """ Pages: