mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-12 02:57:55 +08:00
Fix: retry on meow_buy as previously did
This commit is contained in:
@@ -116,6 +116,7 @@ class MeowfficerBuy(MeowfficerBase):
|
|||||||
Args:
|
Args:
|
||||||
count (int): 1 to BUY_MAX.
|
count (int): 1 to BUY_MAX.
|
||||||
"""
|
"""
|
||||||
|
logger.hr('Meow buy choose', level=2)
|
||||||
self.meow_enter(MEOWFFICER_BUY_ENTER, check_button=MEOWFFICER_BUY)
|
self.meow_enter(MEOWFFICER_BUY_ENTER, check_button=MEOWFFICER_BUY)
|
||||||
|
|
||||||
# info_bar may covers OCR_MEOWFFICER_CHOOSE,
|
# info_bar may covers OCR_MEOWFFICER_CHOOSE,
|
||||||
@@ -133,7 +134,7 @@ class MeowfficerBuy(MeowfficerBase):
|
|||||||
out: page_meowfficer
|
out: page_meowfficer
|
||||||
"""
|
"""
|
||||||
# Here uses a simple click, to avoid clicking MEOWFFICER_BUY multiple times.
|
# 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
|
executed = False
|
||||||
with self.stat.new(
|
with self.stat.new(
|
||||||
genre="meowfficer_buy",
|
genre="meowfficer_buy",
|
||||||
@@ -186,10 +187,11 @@ class MeowfficerBuy(MeowfficerBase):
|
|||||||
buy_amount = max(min(buy_amount, 15), 1)
|
buy_amount = max(min(buy_amount, 15), 1)
|
||||||
overflow_th = self.config.Meowfficer_OverflowCoins
|
overflow_th = self.config.Meowfficer_OverflowCoins
|
||||||
|
|
||||||
count = self.meow_get_buy_count(buy_amount, overflow_th)
|
for _ in range(3):
|
||||||
if count <= 0:
|
count = self.meow_get_buy_count(buy_amount, overflow_th)
|
||||||
return
|
if count <= 0:
|
||||||
self.meow_choose(count)
|
return
|
||||||
self.meow_confirm()
|
self.meow_choose(count)
|
||||||
|
self.meow_confirm()
|
||||||
|
|
||||||
logger.warning('Too many trial in meowfficer buy, stopped.')
|
logger.warning('Too many trial in meowfficer buy, stopped.')
|
||||||
|
|||||||
Reference in New Issue
Block a user