mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 03:58:22 +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
|
||||
if group == 'pr':
|
||||
for idx, btn in enumerate(SHOP_SELECT_PR):
|
||||
if self.appear(btn, offset=(20, 20)):
|
||||
postfix = f'{idx + 1}'
|
||||
postfix = None
|
||||
for _ in range(3):
|
||||
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
|
||||
logger.warning('Failed to detect PR series, '
|
||||
'app may be lagging or frozen')
|
||||
else:
|
||||
postfix = f'_{item.tier.upper()}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user