From 99831beb400a71abd73b9d67e92a85e04c45d9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Mon, 6 Jan 2025 11:51:14 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E7=A7=BB=E5=8A=A8=E7=9A=84=E6=97=B6=E5=80=99=E7=8B=82?= =?UTF-8?q?=E7=82=B9=E6=A0=87=E8=AE=B0=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E7=A7=BB=E5=8A=A8=E6=AC=A1=E6=95=B0=E4=BB=8E?= =?UTF-8?q?0=E5=BC=80=E5=A7=8B=E8=AE=A1=E7=AE=97=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs index 31712f0a..29e89f43 100644 --- a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs +++ b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs @@ -256,7 +256,7 @@ public class TpTask(CancellationToken ct) // https://github.com/babalae/better-genshin-impact/issues/318 if (mouseDistance < tolerance && currentZoomLevel < 2.5) { - Logger.LogInformation($"移动 {iteration} 次鼠标后,已经接近目标点,不再进一步调整。"); + Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); break; } while (mouseDistance > 5 * tolerance && currentZoomLevel < 4) @@ -274,6 +274,11 @@ public class TpTask(CancellationToken ct) totalMoveMouseY *= (currentZoomLevel) / (currentZoomLevel - 1); mouseDistance *= (currentZoomLevel) / (currentZoomLevel - 1); currentZoomLevel--; + if (mouseDistance < tolerance && currentZoomLevel < 2.5) + { + Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); + break; + } } // 单次移动最大距离为 maxMouseMove From 55fb63782e612f46d12806892102af9616d4f96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Tue, 7 Jan 2025 00:22:51 +0800 Subject: [PATCH 02/10] remove force team names --- .../View/Pages/TaskSettingsPage.xaml | 57 ------------------- .../Pages/View/ScriptGroupConfigView.xaml | 28 --------- 2 files changed, 85 deletions(-) diff --git a/BetterGenshinImpact/View/Pages/TaskSettingsPage.xaml b/BetterGenshinImpact/View/Pages/TaskSettingsPage.xaml index ba03236c..19c624f7 100644 --- a/BetterGenshinImpact/View/Pages/TaskSettingsPage.xaml +++ b/BetterGenshinImpact/View/Pages/TaskSettingsPage.xaml @@ -702,35 +702,6 @@ MinWidth="120" Text="{Binding Config.AutoFightConfig.Timeout}" /> - - - - - - - - - - - - - - @@ -1020,34 +991,6 @@ Margin="0,0,36,0" Text="{Binding Config.AutoDomainConfig.LeftRightMoveTimes, Mode=TwoWay}" /> - - - - - - - - - - - - - diff --git a/BetterGenshinImpact/View/Pages/View/ScriptGroupConfigView.xaml b/BetterGenshinImpact/View/Pages/View/ScriptGroupConfigView.xaml index 920e541f..7bc0760d 100644 --- a/BetterGenshinImpact/View/Pages/View/ScriptGroupConfigView.xaml +++ b/BetterGenshinImpact/View/Pages/View/ScriptGroupConfigView.xaml @@ -322,34 +322,6 @@ - - - - - - - - - - - - - Date: Tue, 7 Jan 2025 00:33:21 +0800 Subject: [PATCH 03/10] auto domain: extend the waiting time --- BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.cs b/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.cs index 82b4e36f..bf6f7bb2 100644 --- a/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.cs +++ b/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.cs @@ -329,7 +329,7 @@ public class AutoDomainTask : ISoloTask await Delay(1000, _ct); } - await Delay(1500, _ct); + await Delay(2000, _ct); } private List FindCombatScriptAndSwitchAvatar(CombatScenes combatScenes) @@ -354,7 +354,7 @@ public class AutoDomainTask : ISoloTask await Task.Run((Action)(() => { _simulator.SimulateAction(GIActions.MoveForward, KeyType.KeyDown); - Sleep(20); + Sleep(30, _ct); // 组合键好像不能直接用 postmessage if (!_config.WalkToF) { From 3fb35051d1f83ee84c0f57e340854dc2e813b3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Sun, 5 Jan 2025 22:07:39 +0800 Subject: [PATCH 04/10] update UnityLogGameLocator --- .../Genshin/Paths/UnityLogGameLocator.cs | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/BetterGenshinImpact/Genshin/Paths/UnityLogGameLocator.cs b/BetterGenshinImpact/Genshin/Paths/UnityLogGameLocator.cs index 55939921..c8ba86c0 100644 --- a/BetterGenshinImpact/Genshin/Paths/UnityLogGameLocator.cs +++ b/BetterGenshinImpact/Genshin/Paths/UnityLogGameLocator.cs @@ -12,7 +12,7 @@ namespace BetterGenshinImpact.Genshin.Paths; /// public partial class UnityLogGameLocator { - [GeneratedRegex(@".:/.+(?:GenshinImpact|YuanShen)(?=_Data)", RegexOptions.IgnoreCase)] + [GeneratedRegex(@".:(?:\\|/).+(?:GenshinImpact|YuanShen)(?=_Data)", RegexOptions.IgnoreCase)] private static partial Regex WarmupFileLine(); public static async ValueTask LocateSingleGamePathAsync() @@ -23,28 +23,19 @@ public partial class UnityLogGameLocator string logFilePathOversea = Path.Combine(appDataPath, @"..\LocalLow\miHoYo\Genshin Impact\output_log.txt"); string logFilePathChinese = Path.Combine(appDataPath, @"..\LocalLow\miHoYo\原神\output_log.txt"); - if (File.Exists(logFilePathChinese)) + var p1 = await LocateGamePathAsync(logFilePathChinese).ConfigureAwait(false); + if (p1 is not null) { - var p1 = await LocateGamePathAsync(logFilePathChinese).ConfigureAwait(false); - if (p1 is not null && File.Exists(p1)) - { - return p1; - } - } - - if (File.Exists(logFilePathOversea)) - { - var p2 = await LocateGamePathAsync(logFilePathOversea).ConfigureAwait(false); - if (p2 is not null && File.Exists(p2)) - { - return p2; - } + return p1; } + + return await LocateGamePathAsync(logFilePathOversea).ConfigureAwait(false); } catch (Exception e) { TaskControl.Logger.LogDebug(e, "Failed to locate game path."); } + return null; } @@ -73,8 +64,12 @@ public partial class UnityLogGameLocator return null; } - string entryName = $"{matchResult.Value}.exe"; - string fullPath = Path.GetFullPath(Path.Combine(matchResult.Value, "..", entryName)); + string fullPath = Path.GetFullPath($"{matchResult.Value}.exe"); + if (!File.Exists(fullPath)) + { + return null; + } + return fullPath; } } \ No newline at end of file From 48b51a60e187cedc25a5f6131b8fda79ccdec9a5 Mon Sep 17 00:00:00 2001 From: Womsxd <45663319+Womsxd@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:49:05 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix(Setup):=20=E4=BF=AE=E5=A4=8DBGI?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=8C=85=E5=A4=9A=E4=B8=80=E5=B1=82=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build/MicaSetup/Program.cs | 4 ++-- Build/MicaSetup/Program.un.cs | 4 ++-- Build/setup_build.cmd | 6 +++--- Build/setup_build_for_appveyor.cmd | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Build/MicaSetup/Program.cs b/Build/MicaSetup/Program.cs index c33fb21c..af39a022 100644 --- a/Build/MicaSetup/Program.cs +++ b/Build/MicaSetup/Program.cs @@ -47,10 +47,10 @@ internal class Program option.IsInstallCertificate = false; option.OverlayInstallRemoveExt = "exe,dll,pdb"; option.UnpackingPassword = null!; - option.ExeName = @"BetterGI\BetterGI.exe"; + option.ExeName = @"BetterGI.exe"; option.KeyName = "BetterGI"; option.DisplayName = "BetterGI"; - option.DisplayIcon = @"BetterGI\BetterGI.exe"; + option.DisplayIcon = @"BetterGI.exe"; option.DisplayVersion = "0.0.0.0"; option.Publisher = "babalae"; option.AppName = "BetterGI"; diff --git a/Build/MicaSetup/Program.un.cs b/Build/MicaSetup/Program.un.cs index abeed41f..00422e38 100644 --- a/Build/MicaSetup/Program.un.cs +++ b/Build/MicaSetup/Program.un.cs @@ -41,10 +41,10 @@ internal class Program option.IsAllowFirewall = true; option.IsRefreshExplorer = true; option.IsInstallCertificate = false; - option.ExeName = @"BetterGI\BetterGI.exe"; + option.ExeName = @"BetterGI.exe"; option.KeyName = "BetterGI"; option.DisplayName = "BetterGI"; - option.DisplayIcon = @"BetterGI\BetterGI.exe"; + option.DisplayIcon = @"BetterGI.exe"; option.DisplayVersion = "0.0.0.0"; option.Publisher = "babalae"; option.AppName = "BetterGI"; diff --git a/Build/setup_build.cmd b/Build/setup_build.cmd index 9788ed9e..5bd8871f 100644 --- a/Build/setup_build.cmd +++ b/Build/setup_build.cmd @@ -30,13 +30,13 @@ cd /d %~dp0 del /f /q %tmpfolder%\*.lib del /f /q %tmpfolder%\*ffmpeg*.dll -:: һЩļʼļʺϷGithub +:: 添加一些配置文件开始(大文件不适合放在Github) if exist "E:\HuiTask\BetterGIBuild\BetterGI" ( xcopy "E:\HuiTask\BetterGIBuild\BetterGI\*" "%tmpfolder%" /E /C /I /Y ) -:: һЩļ +:: 添加一些配置文件结束 -MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\ -t7z -mx=5 -mf=BCJ2 -r -y +MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\* -t7z -mx=5 -mf=BCJ2 -r -y copy /y publish.7z .\MicaSetup\Resources\Setups\publish.7z if exist "%zipFile%" ( del /f /q "%zipfile%" ) rename publish.7z %archiveFile% diff --git a/Build/setup_build_for_appveyor.cmd b/Build/setup_build_for_appveyor.cmd index b0f8e36e..9170c40f 100644 --- a/Build/setup_build_for_appveyor.cmd +++ b/Build/setup_build_for_appveyor.cmd @@ -29,7 +29,7 @@ xcopy * "%tmpfolder%" /E /C /I /Y cd /d %~dp0 del /f /q %tmpfolder%\*.lib del /f /q %tmpfolder%\*ffmpeg*.dll -MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\ -t7z -mx=5 -mf=BCJ2 -r -y +MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\* -t7z -mx=5 -mf=BCJ2 -r -y copy /y publish.7z .\MicaSetup\Resources\Setups\publish.7z if exist "%zipFile%" ( del /f /q "%zipfile%" ) rename publish.7z %archiveFile% From 887e812b283645a06ec0354cc6d1b3e3114612c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E7=B1=BD=E9=98=B3=E5=A4=96=E5=A9=86?= <2915414902@qq.com> Date: Tue, 7 Jan 2025 14:57:05 +0800 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d70a8ab..45254fb9 100644 --- a/README.md +++ b/README.md @@ -107,4 +107,4 @@ BetterGI · 更好的原神, 一个基于计算机视觉技术,意图让原 ## 问题反馈 -提 [Issue](https://github.com/babalae/better-genshin-impact/issues) 或 QQ群[783846140](https://qm.qq.com/q/lVzxCCKEko) +提 [Issue](https://github.com/babalae/better-genshin-impact/issues) 或 QQ群[960900268](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=faj5hQWJwrWtl9PG8sSAlN2jlQMQfoU1&authKey=QXFi8LYERO4j8TBnO%2FuDtazKXJdMDZaO%2FV2fXmm3USsjpeU8dJgi7Bha9mdfdXy5&noverify=0&group_code=960900268) From a85129b087375cb5b99af9eb8acc8473ecf6a2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Wed, 8 Jan 2025 00:47:07 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=97=B6=E6=A6=82=E7=8E=87=E6=8C=81=E7=BB=AD?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=A0=87=E8=AE=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameTask/AutoTrackPath/TpTask.cs | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs index f1c93e75..c5500da2 100644 --- a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs +++ b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs @@ -19,7 +19,6 @@ using System.Threading.Tasks; using BetterGenshinImpact.GameTask.Common.Exceptions; using Vanara.PInvoke; using static BetterGenshinImpact.GameTask.Common.TaskControl; -using BetterGenshinImpact.Core.Simulator.Extensions; namespace BetterGenshinImpact.GameTask.AutoTrackPath; @@ -152,7 +151,7 @@ public class TpTask(CancellationToken ct) return (clickX, clickY); } - private async Task checkInBigMapUi() + public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false) { // M 打开地图识别当前位置,中心点为当前位置 var ra1 = CaptureToRectArea(); @@ -164,7 +163,7 @@ public class TpTask(CancellationToken ct) await Delay(1000, ct); ra1 = CaptureToRectArea(); } - Simulation.SendInput.SimulateAction(GIActions.OpenMap); + Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_M); await Delay(1000, ct); for (int i = 0; i < 3; i++) { @@ -174,14 +173,8 @@ public class TpTask(CancellationToken ct) await Delay(500, ct); } } - } - } + } - public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false) - { - - await checkInBigMapUi(); - for (var i = 0; i < 3; i++) { try @@ -198,7 +191,6 @@ public class TpTask(CancellationToken ct) } catch (Exception e) { - await checkInBigMapUi(); Logger.LogError("传送失败,重试 {I} 次", i + 1); Logger.LogDebug(e, "传送失败,重试 {I} 次", i + 1); } @@ -259,34 +251,33 @@ public class TpTask(CancellationToken ct) double mouseDistance = Math.Sqrt(totalMoveMouseX * totalMoveMouseX + totalMoveMouseY * totalMoveMouseY); // 调整地图缩放 // mapZoomLevel<5 才显示传送锚点和秘境; - // mapZoomLevel<3 是为了避免部分锚点过于接近导致选错锚点; + // mapZoomLevel<2.5 是为了避免部分锚点过于接近导致选错锚点; // 风龙废墟无法避免,但是目前没有风龙废墟的脚本吧。:) // https://github.com/babalae/better-genshin-impact/issues/318 - if (mouseDistance < tolerance && currentZoomLevel < 2.5) - { - Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); - break; - } + + // 距离过远,缩小地图 while (mouseDistance > 5 * tolerance && currentZoomLevel < 4) - { // 缩小地图 + { await AdjustMapZoomLevel(false); totalMoveMouseX *= (currentZoomLevel) / (currentZoomLevel + 1); totalMoveMouseY *= (currentZoomLevel) / (currentZoomLevel + 1); mouseDistance *= (currentZoomLevel) / (currentZoomLevel + 1); currentZoomLevel++; } - while (mouseDistance < 2 * tolerance && currentZoomLevel > 2) - { // 放大地图 + // 距离过近,放大地图 + while (mouseDistance < 2 * tolerance && currentZoomLevel > 2.5) + { await AdjustMapZoomLevel(true); totalMoveMouseX *= (currentZoomLevel) / (currentZoomLevel - 1); totalMoveMouseY *= (currentZoomLevel) / (currentZoomLevel - 1); mouseDistance *= (currentZoomLevel) / (currentZoomLevel - 1); currentZoomLevel--; - if (mouseDistance < tolerance && currentZoomLevel < 2.5) - { - Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); - break; - } + } + // 非常接近目标点,不再进一步调整 + if (mouseDistance < tolerance) + { + Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再移动地图。", iteration + 1); + break; } // 单次移动最大距离为 maxMouseMove @@ -302,7 +293,6 @@ public class TpTask(CancellationToken ct) } } - /// /// 调整地图缩放级别以加速移动 /// @@ -478,8 +468,6 @@ public class TpTask(CancellationToken ct) country = tpPosition.Country; } } - - // todo: 识别当前国家 return (recentX, recentY, country); } From b9dd66f87a0ce18d513af64460b801ea09d78cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Wed, 8 Jan 2025 00:53:49 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=90=88=E5=B9=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs index c5500da2..f3cb6ec7 100644 --- a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs +++ b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs @@ -19,6 +19,7 @@ using System.Threading.Tasks; using BetterGenshinImpact.GameTask.Common.Exceptions; using Vanara.PInvoke; using static BetterGenshinImpact.GameTask.Common.TaskControl; +using BetterGenshinImpact.Core.Simulator.Extensions; namespace BetterGenshinImpact.GameTask.AutoTrackPath; @@ -151,7 +152,7 @@ public class TpTask(CancellationToken ct) return (clickX, clickY); } - public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false) + private async Task checkInBigMapUi() { // M 打开地图识别当前位置,中心点为当前位置 var ra1 = CaptureToRectArea(); @@ -163,7 +164,7 @@ public class TpTask(CancellationToken ct) await Delay(1000, ct); ra1 = CaptureToRectArea(); } - Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_M); + Simulation.SendInput.SimulateAction(GIActions.OpenMap); await Delay(1000, ct); for (int i = 0; i < 3; i++) { @@ -173,8 +174,11 @@ public class TpTask(CancellationToken ct) await Delay(500, ct); } } - } - + } + } + public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false) + { + await checkInBigMapUi(); for (var i = 0; i < 3; i++) { try From b92c52cb5cc5f313109dc8bbae1a7ba918ee20ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Wed, 8 Jan 2025 00:56:31 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=90=88=E5=B9=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs index f3cb6ec7..4056d694 100644 --- a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs +++ b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs @@ -195,6 +195,7 @@ public class TpTask(CancellationToken ct) } catch (Exception e) { + await checkInBigMapUi(); Logger.LogError("传送失败,重试 {I} 次", i + 1); Logger.LogDebug(e, "传送失败,重试 {I} 次", i + 1); } From 4415e85856f93a404e1520aee507d70095b499c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Wed, 8 Jan 2025 22:29:46 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=96=87=E4=BB=B6=E5=B8=A6=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/LogParse/LogParse.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BetterGenshinImpact/GameTask/LogParse/LogParse.cs b/BetterGenshinImpact/GameTask/LogParse/LogParse.cs index 68053393..9ec4517b 100644 --- a/BetterGenshinImpact/GameTask/LogParse/LogParse.cs +++ b/BetterGenshinImpact/GameTask/LogParse/LogParse.cs @@ -213,7 +213,7 @@ namespace LogParse } // 定义文件名匹配的正则表达式 - string pattern = @"^better-genshin-impact(\d{8})\.log$"; + string pattern = @"^better-genshin-impact(\d{8})(_\d{3})*\.log$"; Regex regex = new Regex(pattern); // 遍历文件夹中的所有文件