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

Add: Buy all in port shop

- Handle shop items in ItemGrid
This commit is contained in:
LmeSzinc
2021-04-17 17:51:12 +08:00
parent 300e368d4e
commit 8a71cb6f70
21 changed files with 273 additions and 17 deletions

View File

@@ -8,22 +8,22 @@ from module.os_handler.enemy_searching import EnemySearchingHandler
class MapEventHandler(EnemySearchingHandler):
def handle_map_get_items(self):
def handle_map_get_items(self, interval=2):
if self.is_in_map():
return False
if self.appear(GET_ITEMS_1, interval=2) \
or self.appear(GET_ITEMS_2, interval=2) \
or self.appear(GET_ITEMS_3, interval=2):
if self.appear(GET_ITEMS_1, interval=interval) \
or self.appear(GET_ITEMS_2, interval=interval) \
or self.appear(GET_ITEMS_3, interval=interval):
self.device.click(CLICK_SAFE_AREA)
return True
if self.appear(GET_ADAPTABILITY, interval=2):
if self.appear(GET_ADAPTABILITY, interval=interval):
self.device.click(CLICK_SAFE_AREA)
return True
if self.appear(GET_MEOWFFICER_ITEMS_1, interval=2):
if self.appear(GET_MEOWFFICER_ITEMS_1, interval=interval):
self.device.click(CLICK_SAFE_AREA)
return True
if self.appear(GET_MEOWFFICER_ITEMS_2, interval=2):
if self.appear(GET_MEOWFFICER_ITEMS_2, interval=interval):
self.device.click(CLICK_SAFE_AREA)
return True