mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-24 05:16:59 +08:00
Fix: retry PR series detection; can fail due to lag or potato pc
This commit is contained in:
@@ -114,10 +114,21 @@ class GuildShop(ShopBase, ShopUI):
|
|||||||
"""
|
"""
|
||||||
group = item.group
|
group = item.group
|
||||||
if group == 'pr':
|
if group == 'pr':
|
||||||
for idx, btn in enumerate(SHOP_SELECT_PR):
|
postfix = None
|
||||||
if self.appear(btn, offset=(20, 20)):
|
for _ in range(3):
|
||||||
postfix = f'{idx + 1}'
|
if _:
|
||||||
|
self.device.sleep((0.3, 0.5))
|
||||||
|
self.device.screenshot()
|
||||||
|
|
||||||
|
for idx, btn in enumerate(SHOP_SELECT_PR):
|
||||||
|
if self.appear(btn, offset=(20, 20)):
|
||||||
|
postfix = f'{idx + 1}'
|
||||||
|
break
|
||||||
|
|
||||||
|
if postfix is not None:
|
||||||
break
|
break
|
||||||
|
logger.warning('Failed to detect PR series, '
|
||||||
|
'app may be lagging or frozen')
|
||||||
else:
|
else:
|
||||||
postfix = f'_{item.tier.upper()}'
|
postfix = f'_{item.tier.upper()}'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user