diff --git a/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipTrigger.cs b/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipTrigger.cs index 9bc3d9e1..52bde76b 100644 --- a/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipTrigger.cs +++ b/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipTrigger.cs @@ -48,7 +48,7 @@ public class AutoSkipTrigger : ITaskTrigger /// /// 上一次播放中的帧 /// - private int _prevPlayingFrameIndex = -1; + private DateTime _prevPlayingTime = DateTime.MinValue; public void OnCapture(CaptureContent content) { @@ -65,14 +65,14 @@ public class AutoSkipTrigger : ITaskTrigger var isPlaying = !foundRectArea.IsEmpty(); // 播放中 // 播放中图标消失3s内OCR判断文字 - if (!isPlaying && Math.Abs(content.FrameIndex - _prevPlayingFrameIndex) <= content.FrameRate * 2) + if (!isPlaying && (DateTime.Now - _prevPlayingTime).TotalSeconds <= 2) { // 找播放中的文字 content.CaptureRectArea.Find(_autoSkipAssets.PlayingTextRo, _ => { isPlaying = true; }); if (!isPlaying) { - // 关闭弹出页 //todo 可能会误判关闭传送窗口,可以加上二次判断 + // 关闭弹出页 content.CaptureRectArea.Find(_autoSkipAssets.PageCloseRo, pageCloseRoRa => { pageCloseRoRa.ClickCenter(); @@ -91,7 +91,7 @@ public class AutoSkipTrigger : ITaskTrigger if (isPlaying) { - _prevPlayingFrameIndex = content.FrameIndex; + _prevPlayingTime = DateTime.Now; if (TaskContext.Instance().Config.AutoSkipConfig.QuicklySkipConversationsEnabled) { Simulation.SendInput.Keyboard.KeyPress(VirtualKeyCode.SPACE); diff --git a/BetterGenshinImpact/User/pick_black_lists.json b/BetterGenshinImpact/User/pick_black_lists.json index 17ddf713..16d669fd 100644 --- a/BetterGenshinImpact/User/pick_black_lists.json +++ b/BetterGenshinImpact/User/pick_black_lists.json @@ -4,9 +4,6 @@ "查", "子", - "薄荷", - "甜甜花", - "树莓", "合成", "烹饪", "锻造",