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

Fix: Detected as mail empty if MAIL_MANAGE click missed

This commit is contained in:
LmeSzinc
2024-07-21 02:28:43 +08:00
parent 39fceddb52
commit 26fe3dda1d

View File

@@ -41,6 +41,7 @@ class MailWhite(UI):
MAIL_MANAGE
])
timeout = Timer(0.6, count=1)
has_mail = False
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
@@ -51,7 +52,7 @@ class MailWhite(UI):
if self.appear(MAIL_BATCH_CLAIM, offset=(20, 20)):
logger.info('Mail entered')
return True
if self.appear(GOTO_MAIN_WHITE, offset=(20, 20)):
if not has_mail and self.appear(GOTO_MAIN_WHITE, offset=(20, 20)):
timeout.start()
if timeout.reached():
logger.info('Mail empty')
@@ -59,6 +60,7 @@ class MailWhite(UI):
# Click
if self.appear_then_click(MAIL_MANAGE, offset=(30, 30), interval=3):
has_mail = True
continue
if self.ui_main_appear_then_click(page_mail, offset=(30, 30), interval=3):
continue