mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 13:25:26 +08:00
Fix: Handle popups after exiting from page_tactical to page_reward (#1018)
This commit is contained in:
@@ -361,6 +361,8 @@ class RewardTacticalClass(UI):
|
|||||||
if self.handle_urgent_commission():
|
if self.handle_urgent_commission():
|
||||||
# Only one button in the middle, when skill reach max level.
|
# Only one button in the middle, when skill reach max level.
|
||||||
continue
|
continue
|
||||||
|
if self.ui_page_main_popups():
|
||||||
|
continue
|
||||||
if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=2) \
|
if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=2) \
|
||||||
and self.appear(TACTICAL_CLASS_START, offset=(30, 30)):
|
and self.appear(TACTICAL_CLASS_START, offset=(30, 30)):
|
||||||
self.device.sleep(0.3)
|
self.device.sleep(0.3)
|
||||||
|
|||||||
@@ -359,16 +359,10 @@ class UI(InfoHandler):
|
|||||||
|
|
||||||
_opsi_reset_fleet_preparation_click = 0
|
_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
|
# Guild popup
|
||||||
if self.handle_guild_popup_cancel():
|
if self.handle_guild_popup_cancel():
|
||||||
return True
|
return True
|
||||||
@@ -392,6 +386,20 @@ class UI(InfoHandler):
|
|||||||
if self.appear_then_click(BATTLE_PASS_NOTICE, offset=(30, 30), interval=3):
|
if self.appear_then_click(BATTLE_PASS_NOTICE, offset=(30, 30), interval=3):
|
||||||
return True
|
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
|
# Routed from confirm click
|
||||||
if self.appear(SHIPYARD_CHECK, offset=(30, 30), interval=3):
|
if self.appear(SHIPYARD_CHECK, offset=(30, 30), interval=3):
|
||||||
if self.appear_then_click(GOTO_MAIN, offset=(30, 30)):
|
if self.appear_then_click(GOTO_MAIN, offset=(30, 30)):
|
||||||
|
|||||||
Reference in New Issue
Block a user