Fix: Handle MISSION_POPUP_ACK when receiving tactical class

This commit is contained in:
LmeSzinc 2024-04-10 21:37:08 +08:00
parent 024b7f3143
commit 9077901820

View File

@ -7,7 +7,7 @@ from module.base.timer import Timer
from module.base.utils import *
from module.combat.level import LevelOcr
from module.exception import ScriptError
from module.handler.assets import GET_MISSION, POPUP_CANCEL, POPUP_CONFIRM
from module.handler.assets import GET_MISSION, MISSION_POPUP_ACK, MISSION_POPUP_GO, POPUP_CANCEL, POPUP_CONFIRM
from module.logger import logger
from module.map.map_grids import SelectedGrids
from module.ocr.ocr import DigitCounter, Duration, Ocr
@ -445,6 +445,10 @@ class RewardTacticalClass(Dock):
continue
if self.ui_page_main_popups():
continue
# Similar to handle_mission_popup_ack, but battle pass item expire popup has a different ACK button
if self.appear(MISSION_POPUP_GO, offset=self._popup_offset, interval=2):
self.device.click(MISSION_POPUP_ACK)
continue
if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=2) \
and self.appear(TACTICAL_CLASS_START, offset=(30, 30)):
if self._tactical_books_choose():