mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Topmost urgent commission undetected error
This commit is contained in:
parent
eb80f05ff5
commit
c1a12b529e
@ -181,11 +181,16 @@ class RewardCommission(UI, InfoHandler):
|
|||||||
# If daily list has commissions > 4, usually to be 5, and 1 <= urgent <= 4
|
# If daily list has commissions > 4, usually to be 5, and 1 <= urgent <= 4
|
||||||
# commission list will have an animation to scroll,
|
# commission list will have an animation to scroll,
|
||||||
# which causes the topmost one undetected.
|
# which causes the topmost one undetected.
|
||||||
if not COMMISSION_SCROLL.appear(main=self) or COMMISSION_SCROLL.cal_position(main=self) < 0.05:
|
if not COMMISSION_SCROLL.appear(main=self) or COMMISSION_SCROLL.cal_position(main=self) < 0.05 or COMMISSION_SCROLL.length / COMMISSION_SCROLL.total > 0.98:
|
||||||
|
pre_peaks = lines_detect(self.device.image)
|
||||||
|
if not len(pre_peaks):
|
||||||
|
return True
|
||||||
|
self.device.screenshot()
|
||||||
while 1:
|
while 1:
|
||||||
peaks = lines_detect(self.device.image)
|
peaks = lines_detect(self.device.image)
|
||||||
if not len(peaks) or peaks[0] > 67 + 117:
|
if (not len(peaks) or peaks[0] > 67 + 117) and (not len(pre_peaks) or abs(peaks[0] - pre_peaks[0]) < 3):
|
||||||
break
|
break
|
||||||
|
pre_peaks = peaks
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user