From 6ba3265682c2f25ba11ca64677e6f4c4409b35a3 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Thu, 30 Jul 2026 00:36:33 +0800 Subject: [PATCH] Fix: retry on meow_buy as previously did --- module/meowfficer/buy.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/module/meowfficer/buy.py b/module/meowfficer/buy.py index 49e59b585..3b506ba16 100644 --- a/module/meowfficer/buy.py +++ b/module/meowfficer/buy.py @@ -116,6 +116,7 @@ class MeowfficerBuy(MeowfficerBase): Args: count (int): 1 to BUY_MAX. """ + logger.hr('Meow buy choose', level=2) self.meow_enter(MEOWFFICER_BUY_ENTER, check_button=MEOWFFICER_BUY) # info_bar may covers OCR_MEOWFFICER_CHOOSE, @@ -133,7 +134,7 @@ class MeowfficerBuy(MeowfficerBase): out: page_meowfficer """ # Here uses a simple click, to avoid clicking MEOWFFICER_BUY multiple times. - logger.hr('Meow confirm') + logger.hr('Meow buy confirm', level=2) executed = False with self.stat.new( genre="meowfficer_buy", @@ -186,10 +187,11 @@ class MeowfficerBuy(MeowfficerBase): buy_amount = max(min(buy_amount, 15), 1) overflow_th = self.config.Meowfficer_OverflowCoins - count = self.meow_get_buy_count(buy_amount, overflow_th) - if count <= 0: - return - self.meow_choose(count) - self.meow_confirm() + for _ in range(3): + count = self.meow_get_buy_count(buy_amount, overflow_th) + if count <= 0: + return + self.meow_choose(count) + self.meow_confirm() logger.warning('Too many trial in meowfficer buy, stopped.')