1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 12:08:21 +08:00

Pref: Exit use box loop before checking scroll at_bottom

This commit is contained in:
LmeSzinc
2025-05-23 15:43:06 +08:00
parent a42235e3ad
commit d955267ded

View File

@@ -250,9 +250,11 @@ class StorageHandler(StorageUI):
else:
MATERIAL_SCROLL.set_top(main=self)
while amount > used:
while 1:
logger.hr('Use boxes in page')
used += self._storage_use_box_in_page(rarity=rarity, amount=amount - used)
used += self._storage_use_box_in_page(rarity=rarity, amount=max(amount - used, 0))
if used >= amount:
break
if MATERIAL_SCROLL.at_bottom(main=self):
logger.info('Scroll bar reached end, stop')
break