From ba744b2418d9982fadfb5f9c123740abeb7b45e2 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 11 Aug 2024 17:17:57 +0800 Subject: [PATCH] Fix: combat_get_trailblaze_power never gets timeout --- tasks/combat/prepare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/combat/prepare.py b/tasks/combat/prepare.py index 37e069731..9c0dfefd4 100644 --- a/tasks/combat/prepare.py +++ b/tasks/combat/prepare.py @@ -64,13 +64,13 @@ class CombatPrepare(StaminaStatus): self.device.screenshot() data = self.update_stamina_status(image=self.device.image) + if timeout.reached(): + break if data.stamina is None: continue # Confirm if it is > 240, sometimes just OCR errors # if current > 240 and timeout.reached(): # break - if expect_reduce and timeout.reached(): - break if expect_reduce and data.stamina >= before: continue if data.stamina <= 240: