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

fix(Device): When a friend invitation appears during a long battle, the battle status is cancelled

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

+ 3 - 0
tasks/base_task.py

@@ -65,6 +65,7 @@ class BaseTask(GlobalGameAssets):
         if self.friend_timer and self.friend_timer.reached():
             self.friend_timer.reset()
             invite = self.appear(self.I_G_ACCEPT)
+            detect_record = self.device.detect_record
             # 如果是全部接受
             if invite and self.config.global_game.emergency.friend_invitation == FriendInvitation.ACCEPT:
                 # 如果是接受邀请
@@ -93,6 +94,8 @@ class BaseTask(GlobalGameAssets):
                         continue
                     if not self.appear(self.I_G_ACCEPT):
                         break
+            # 有的时候长战斗 点击后会取消战斗状态
+            self.device.detect_record = detect_record
             # 判断网络异常
             if self.appear(self.I_NETWORK_ABNORMAL):
                 logger.warning(f"Network abnormal")