|
|
@@ -330,10 +330,14 @@ class LoginHandler(BaseTask, RestartAssets, GameUiAssets, GeneralBuffAssets):
|
|
|
if not self.appear(self.I_READ_ALL_MAIL):
|
|
|
return False
|
|
|
logger.info('Harvest mail')
|
|
|
+ open_mail_timer = Timer(15).start()
|
|
|
while 1:
|
|
|
self.screenshot()
|
|
|
if self.appear(self.I_READ_ALL_MAIL):
|
|
|
break
|
|
|
+ if open_mail_timer.reached():
|
|
|
+ logger.warning('Harvest mail page did not open within 15 seconds, skip mail harvest')
|
|
|
+ return False
|
|
|
if self.appear_then_click_multi_scale(self.I_HARVEST_MAIL, interval=1.5, scale_range=(0.8, 1.1)):
|
|
|
continue
|
|
|
if self.appear_then_click(self.I_HARVEST_MAIL_COPY, interval=1.5):
|