1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-14 07:16:04 +08:00

Opt: Stop swiping commission list if already reached bottom

This commit is contained in:
LmeSzinc
2020-07-19 03:10:28 +08:00
parent 6f736232bf
commit 7505fbc481
5 changed files with 7 additions and 0 deletions

View File

@@ -520,10 +520,16 @@ class RewardCommission(UI, InfoHandler):
commission.merge(self.device.image)
if commission.count <= 3:
return commission
mean = np.mean(self.device.image.crop(COMMISSION_SCROLL.area), axis=1)
bar = np.where(color_similar_1d(mean, color=(247, 211, 66)))[0]
if len(bar) < 10 * 2:
return commission
prev = commission.count
for _ in range(15):
self._commission_swipe()
if self.appear(COMMISSION_SCROLL_BOTTOM):
break
commission.merge(self.device.image)
if commission.count - prev <= 0:
break