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

Fix: Handle popups after exiting from page_tactical to page_reward (#1018)

This commit is contained in:
LmeSzinc
2022-04-17 18:28:42 +08:00
parent 304b65bc2c
commit b3a85f9ba5
2 changed files with 18 additions and 8 deletions

View File

@@ -359,16 +359,10 @@ class UI(InfoHandler):
_opsi_reset_fleet_preparation_click = 0
def ui_additional(self):
def ui_page_main_popups(self):
"""
Handle all annoying popups during UI switching.
Handle popups appear at page_main, page_reward
"""
# Research popup, lost connection popup
if self.handle_popup_confirm("UI_ADDITIONAL"):
return True
if self.handle_urgent_commission():
return True
# Guild popup
if self.handle_guild_popup_cancel():
return True
@@ -392,6 +386,20 @@ class UI(InfoHandler):
if self.appear_then_click(BATTLE_PASS_NOTICE, offset=(30, 30), interval=3):
return True
def ui_additional(self):
"""
Handle all annoying popups during UI switching.
"""
# Research popup, lost connection popup
if self.handle_popup_confirm("UI_ADDITIONAL"):
return True
if self.handle_urgent_commission():
return True
# Popups appear at page_main, page_reward
if self.ui_page_main_popups():
return True
# Routed from confirm click
if self.appear(SHIPYARD_CHECK, offset=(30, 30), interval=3):
if self.appear_then_click(GOTO_MAIN, offset=(30, 30)):