From 9c37bf4eb4cc199396bff88953f61c9faa6cd798 Mon Sep 17 00:00:00 2001 From: Air111 <1796389814@qq.com> Date: Wed, 24 Apr 2024 12:18:45 +0800 Subject: [PATCH] Fix: campaign_ensure_chapter incorrect due to slow animation --- module/campaign/campaign_ui.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/module/campaign/campaign_ui.py b/module/campaign/campaign_ui.py index f6fd2cacd1..90e2757d88 100644 --- a/module/campaign/campaign_ui.py +++ b/module/campaign/campaign_ui.py @@ -44,15 +44,20 @@ def campaign_ensure_chapter(self, index, skip_first_screenshot=True): logger.attr("Index", current) diff = index - current if diff == 0: - break - + # index=4, current=4, actual=14 + error_confirm.start() + if not error_confirm.reached(): + continue + else: + break # 14-4 may be OCR as 4-1 due to slow animation, confirm if it is 4-1 - if index >= 11 and index % 10 == current: + # index=14, current=4, actual=14 + elif index >= 11 and index % 10 == current: error_confirm.start() if not error_confirm.reached(): continue else: - error_confirm.reset() + error_confirm.clear() # Switch if retry.reached():