This commit is contained in:
zjl
2025-01-06 14:24:16 +08:00
7 changed files with 45 additions and 19 deletions

View File

@@ -1,7 +0,0 @@
// 作者:百事都不通
// 描述:四神指钟离、芙宁娜、雷电将军、玛薇卡
钟离 s(0.2),e(hold),wait(0.3),w(0.2),q
芙宁娜 e,wait(0.3),q
雷电将军 e
玛薇卡 e

View File

@@ -34,7 +34,7 @@ public partial class PathingConditionConfig : ObservableObject
new Condition
{
Subject = "队伍中角色",
Object = ["绮良良", "莱依拉", "芭芭拉", "七七"],
Object = ["绮良良", "莱依拉", "茜特菈莉", "芭芭拉", "七七"],
Result = "循环短E"
},

View File

@@ -157,6 +157,12 @@ public class TpTask(CancellationToken ct)
var ra1 = CaptureToRectArea();
if (!Bv.IsInBigMapUi(ra1))
{
while (!Bv.IsInMainUi(ra1))
{
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_ESCAPE);
await Delay(1000, ct);
ra1 = CaptureToRectArea();
}
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_M);
await Delay(1000, ct);
for (int i = 0; i < 3; i++)

View File

@@ -18,25 +18,38 @@ public class RegistryGameLocator
var cn = Registry.GetValue($@"HKEY_CURRENT_USER\Software\miHoYo\HYP\1_1\hk4e_cn", "GameInstallPath", null) as string;
if (!string.IsNullOrEmpty(cn))
{
return Path.Combine(cn, "YuanShen.exe");
var filePath = Path.Combine(cn, "YuanShen.exe");
if (File.Exists(filePath))
{
return filePath;
}
}
var global = Registry.GetValue($@"HKEY_CURRENT_USER\Software\Cognosphere\HYP\1_0\hk4e_global", "GameInstallPath", null) as string;
if (!string.IsNullOrEmpty(global))
{
return Path.Combine(global, "GenshinImpact.exe");
var filePath = Path.Combine(global, "GenshinImpact.exe");
if (File.Exists(filePath))
{
return filePath;
}
}
var bilibili = Registry.GetValue($@"HKEY_CURRENT_USER\Software\miHoYo\HYP\standalone\14_0\hk4e_cn\umfgRO5gh5\hk4e_cn", "GameInstallPath", null) as string;
if (!string.IsNullOrEmpty(bilibili))
{
return Path.Combine(bilibili, "YuanShen.exe");
var filePath = Path.Combine(bilibili, "YuanShen.exe");
if (File.Exists(filePath))
{
return filePath;
}
}
}
catch (Exception e)
{
TaskControl.Logger.LogDebug(e, "Failed to locate game path.");
TaskControl.Logger.LogDebug(e, "Failed to locate game path from HYP.");
}
return null;
}
}

View File

@@ -23,15 +23,29 @@ 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");
// Fallback to the CN server.
string logFilePath = File.Exists(logFilePathChinese) ? logFilePathChinese : logFilePathOversea;
return await LocateGamePathAsync(logFilePath).ConfigureAwait(false);
if (File.Exists(logFilePathChinese))
{
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;
}
}
}
catch (Exception e)
{
TaskControl.Logger.LogDebug(e, "Failed to locate game path.");
return null;
}
return null;
}
private static async ValueTask<string?> LocateGamePathAsync(string logFilePath)

View File

@@ -337,14 +337,14 @@ public partial class HomePageViewModel : ObservableObject, INavigationAware, IVi
{
Task.Run(async () =>
{
var p1 = await UnityLogGameLocator.LocateSingleGamePathAsync();
var p1 = RegistryGameLocator.GetDefaultGameInstallPath();
if (!string.IsNullOrEmpty(p1))
{
Config.GenshinStartConfig.InstallPath = p1;
}
else
{
var p2 = RegistryGameLocator.GetDefaultGameInstallPath();
var p2 = await UnityLogGameLocator.LocateSingleGamePathAsync();
if (!string.IsNullOrEmpty(p2))
{
Config.GenshinStartConfig.InstallPath = p2;

View File

@@ -43,7 +43,7 @@ BetterGI · 更好的原神, 一个基于计算机视觉技术,意图让原
## 截图
<img src="https://img.alicdn.com/imgextra/i3/2042484851/O1CN01yzhTp81lhoJ6DaG5K_!!2042484851.gif"/>
![0 39 1](https://github.com/user-attachments/assets/8fb0bfd9-e0db-4289-800f-1bc2efb221aa)
## 下载