mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 13:15:38 +08:00
Fix: Detected as mail empty if MAIL_MANAGE click missed
This commit is contained in:
@@ -41,6 +41,7 @@ class MailWhite(UI):
|
|||||||
MAIL_MANAGE
|
MAIL_MANAGE
|
||||||
])
|
])
|
||||||
timeout = Timer(0.6, count=1)
|
timeout = Timer(0.6, count=1)
|
||||||
|
has_mail = False
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
skip_first_screenshot = False
|
skip_first_screenshot = False
|
||||||
@@ -51,7 +52,7 @@ class MailWhite(UI):
|
|||||||
if self.appear(MAIL_BATCH_CLAIM, offset=(20, 20)):
|
if self.appear(MAIL_BATCH_CLAIM, offset=(20, 20)):
|
||||||
logger.info('Mail entered')
|
logger.info('Mail entered')
|
||||||
return True
|
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()
|
timeout.start()
|
||||||
if timeout.reached():
|
if timeout.reached():
|
||||||
logger.info('Mail empty')
|
logger.info('Mail empty')
|
||||||
@@ -59,6 +60,7 @@ class MailWhite(UI):
|
|||||||
|
|
||||||
# Click
|
# Click
|
||||||
if self.appear_then_click(MAIL_MANAGE, offset=(30, 30), interval=3):
|
if self.appear_then_click(MAIL_MANAGE, offset=(30, 30), interval=3):
|
||||||
|
has_mail = True
|
||||||
continue
|
continue
|
||||||
if self.ui_main_appear_then_click(page_mail, offset=(30, 30), interval=3):
|
if self.ui_main_appear_then_click(page_mail, offset=(30, 30), interval=3):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user