Jelajahi Sumber

修复某些情况下进入不了招财上宾判断的bug

YLXJ 2 tahun lalu
induk
melakukan
072f8e3c6f
1 mengubah file dengan 2 tambahan dan 6 penghapusan
  1. 2 6
      tasks/KekkaiUtilize/script_task.py

+ 2 - 6
tasks/KekkaiUtilize/script_task.py

@@ -202,16 +202,12 @@ class ScriptTask(GameUi, ReplaceShikigami, KekkaiUtilizeAssets):
                 if self.appear(self.I_EXP_EXTRACT):
                     # 如果达到今日领取的最大,就不领取了
                     cur, res, totol = self.O_BOX_EXP.ocr(self.device.image)
-                    if cur == res == totol == 0:
-                        continue
-                    if cur == totol and cur + res == totol:
+                    if cur != 0 and totol != 0 and cur == totol and cur + res == totol:
                         logger.info('Exp box reach max do not collect')
                         break
                     # 开启招财上宾后,上限增加20%,数值位置有偏移
                     cur, res, totol = self.O_BOX_EXP_ZCSB.ocr(self.device.image)
-                    if cur == res == totol == 0:
-                        continue
-                    if cur == totol * 1.2 and cur + res == totol:
+                    if cur != 0 and totol != 0 and cur == totol * 1.2 and cur + res == totol:
                         logger.info('Exp box reach max do not collect')
                         break
                 if self.appear_then_click(self.I_BOX_EXP, threshold=0.6, interval=1):