Przeglądaj źródła

fix: add 0.8s delay after clicking I_I_NO_DEFAULT to wait for UI update

修复组队邀请时,点击'默认邀请'勾选框后,UI来不及刷新导致无法识别'已勾选'状态,从而无法break循环、重复点击的问题。

根因:点击 I_I_NO_DEFAULT 后立即截图判断 I_I_DEFAULT,但游戏UI渲染需要时间,导致循环无法退出。

修复:在点击后增加0.8秒延时,确保UI状态更新后再继续判断。

Fixes #1881
allesgutefy 1 miesiąc temu
rodzic
commit
ca7a4189d3
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      tasks/Component/GeneralInvite/general_invite.py

+ 1 - 0
tasks/Component/GeneralInvite/general_invite.py

@@ -543,6 +543,7 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
                     if self.appear(self.I_I_DEFAULT):
                         break
                     if self.appear_then_click(self.I_I_NO_DEFAULT, interval=1):
+                        sleep(0.8)
                         continue
         # 点击确认
         while 1: