From a950348856b9a6b98060e664e5ac35d18bd2ca6f Mon Sep 17 00:00:00 2001 From: Heng Yu Date: Mon, 9 Dec 2024 01:56:32 +0800 Subject: [PATCH] Fix: get reward logic --- tasks/freebies/gift_of_odyssey.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/freebies/gift_of_odyssey.py b/tasks/freebies/gift_of_odyssey.py index ac3668cae..e1caf73e0 100644 --- a/tasks/freebies/gift_of_odyssey.py +++ b/tasks/freebies/gift_of_odyssey.py @@ -54,9 +54,11 @@ class GiftofOdyssey(UI): else: self.device.screenshot() - if not self.handle_reward() and not self.appear(GET_REWARD_BUTTON): + if self.appear(EVENT_SELECTED) and not self.appear(GET_REWARD_BUTTON): logger.info("No more reward to get") break + if self.handle_reward(): + continue if interval.reached(): if self.appear_then_click(GET_REWARD_BUTTON): interval.reset()