Эх сурвалжийг харах

fix: Accept friend invitation but no screenshots

runhey 3 жил өмнө
parent
commit
3a101ae22f
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      tasks/base_task.py

+ 3 - 0
tasks/base_task.py

@@ -71,6 +71,7 @@ class BaseTask(GlobalGameAssets):
                 # 如果是接受邀请
                 logger.info(f"Accept friend invitation")
                 while 1:
+                    self.device.screenshot()
                     if self.appear_then_click(self.I_G_ACCEPT, interval=1):
                         continue
                     if not self.appear(self.I_G_ACCEPT):
@@ -79,6 +80,7 @@ class BaseTask(GlobalGameAssets):
             elif invite and self.config.global_game.emergency.friend_invitation == FriendInvitation.REJECT:
                 logger.info(f"Reject friend invitation")
                 while 1:
+                    self.device.screenshot()
                     if self.appear_then_click(self.I_G_REJECT, interval=1):
                         continue
                     if not self.appear(self.I_G_REJECT):
@@ -87,6 +89,7 @@ class BaseTask(GlobalGameAssets):
             elif invite and self.config.global_game.emergency.friend_invitation == FriendInvitation.ONLY_JADE:
                 logger.info(f"Accept jade invitation")
                 while 1:
+                    self.device.screenshot()
                     if self.appear_then_click(self.I_G_ACCEPT, interval=1):
                         continue
                     if not self.appear(self.I_G_ACCEPT):