From 6f8cfbee4f12ef8ef99c63a9dc678bfb01d1e92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=9C=88?= <18420831+qiuyue0@users.noreply.github.com> Date: Mon, 4 Mar 2024 00:31:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=92=93=E9=B1=BC=E5=90=8E=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关闭自动钓鱼后停止输出相关日志 --- .../GameTask/AutoFishing/AutoFishingTrigger.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BetterGenshinImpact/GameTask/AutoFishing/AutoFishingTrigger.cs b/BetterGenshinImpact/GameTask/AutoFishing/AutoFishingTrigger.cs index c5bd0d8e..2822ab2a 100644 --- a/BetterGenshinImpact/GameTask/AutoFishing/AutoFishingTrigger.cs +++ b/BetterGenshinImpact/GameTask/AutoFishing/AutoFishingTrigger.cs @@ -757,7 +757,7 @@ namespace BetterGenshinImpact.GameTask.AutoFishing { Retry.Do(() => { - if (!SystemControl.IsGenshinImpactActiveByProcess()) + if (IsEnabled && !SystemControl.IsGenshinImpactActiveByProcess()) { _logger.LogWarning("当前获取焦点的窗口不是原神,暂停"); throw new RetryException("当前获取焦点的窗口不是原神"); @@ -1069,7 +1069,7 @@ namespace BetterGenshinImpact.GameTask.AutoFishing { var prevIsExclusive = IsExclusive; IsExclusive = FindButtonForExclusive(content); - if (!prevIsExclusive && IsExclusive) + if (IsEnabled && !prevIsExclusive && IsExclusive) { _logger.LogInformation("→ {Text}", "自动钓鱼,启动!"); var autoThrowRodEnabled = TaskContext.Instance().Config.AutoFishingConfig.AutoThrowRodEnabled; @@ -1127,4 +1127,4 @@ namespace BetterGenshinImpact.GameTask.AutoFishing // ClearDraw(); //} } -} \ No newline at end of file +}