Commit Graph

117 Commits

Author SHA1 Message Date
辉鸭蛋
509ff4dce6 fix bug
1. 修复自动伐木空指针
2. 修复火神秘境
2025-02-25 01:09:49 +08:00
辉鸭蛋
92516c26d2 支持配置要通知的事件 2025-02-04 17:11:53 +08:00
辉鸭蛋
1efd8d9454 重构通知模块 2025-02-03 15:02:25 +08:00
辉鸭蛋
33d742bd4d Merge branch 'main' into pr/1054 2025-02-01 22:16:36 +08:00
辉鸭蛋
b14de9ed20 auto domain: SendInput instead of PostMessage 2025-01-30 08:07:51 +08:00
辉鸭蛋
f19ee557b2 Merge branch 'main' into webhook 2025-01-27 13:57:23 +08:00
辉鸭蛋
917ba1460d fix some bug 2025-01-24 00:16:11 +08:00
Scarlet
cb84ae36d0 feat: integrate send() method into notification to allow for shorter call 2025-01-22 12:34:42 -06:00
Scarlet
2181e74a30 feat: unify factories; allow creating from actual params to instantiate a builder 2025-01-21 23:42:31 -06:00
Scarlet
50513613de feature: notification-based webhook 2025-01-21 22:22:27 -06:00
辉鸭蛋
12beabc6a2 fixed #971 2025-01-18 12:25:08 +08:00
辉鸭蛋
3da43f3543 fixed #997 2025-01-18 12:05:58 +08:00
辉鸭蛋
02f6309a11 fix auto domain dont walk to F 2025-01-17 01:52:43 +08:00
辉鸭蛋
2e27154871 mandatory verification of game resolution
自动战斗 秘境 强制校验游戏分辨率
2025-01-10 00:11:22 +08:00
辉鸭蛋
07b8899a51 auto domain: extend the waiting time 2025-01-07 00:33:21 +08:00
Ayu0K
2bf74c466b fix: 删除了中途更改全局改键功能的实现方式时遗留的无用代码 2025-01-06 23:30:36 +08:00
Ayu0K
a11639f243 mod: 使用新的方案改写AutoDomain 2025-01-06 22:55:07 +08:00
Ayu0K
ca3b31f84e mod: 将按键设置与VK解耦合,并提供KeyId向WPF按键、WPF鼠标按键以及VK的互相转换。 2025-01-06 22:55:07 +08:00
Ayu0K
9fa2bcb5a7 mod: 将AutoDomain启动秘境与领取奖励的识别目标和拾取按键与AutoPick统一 2025-01-06 22:55:07 +08:00
Ayu0K
5d80d6d53b mod: 修改AutoDomain中角色移动(用于支持非QWERTY布局的键盘)、冲刺、吃药的按键为KeyBindingsConfig记录的按键;修改方案参考AutoWood,在调用Start方法时将该模块需要用到的按键从KeyBindingsConfig中取出 2025-01-06 22:55:07 +08:00
Ayu0K
5a19b7d2ef mod: 将AutoDomain启动秘境与领取奖励的识别目标和拾取按键与AutoPick统一 2025-01-06 22:55:07 +08:00
辉鸭蛋
c80799cbee 0.39.1 & fix some bug 2025-01-02 22:49:38 +08:00
辉鸭蛋
5e929d3d07 fix walk to domain 2025-01-01 23:07:12 +08:00
辉鸭蛋
d71ff06868 fix domain and map retry 2024-12-29 20:54:31 +08:00
辉鸭蛋
6127fab70b auto domain retry 2024-12-29 17:10:02 +08:00
辉鸭蛋
9d807e1e42 1. walk to F 2. auto music 2024-12-29 16:02:35 +08:00
辉鸭蛋
dffccd0740 fix auto domain camera bug 2024-12-02 23:40:54 +08:00
辉鸭蛋
e2a25e4492 new camera orientation algorithm by https://github.com/Limint 2024-12-02 22:53:40 +08:00
辉鸭蛋
2083caa9d7 one dragon: params opt 2024-11-26 23:47:40 +08:00
辉鸭蛋
d7302b65c3 auto domain: tp & switch party & artifact salvage 2024-11-24 17:48:23 +08:00
辉鸭蛋
74acb4eb1c 0.37.1 2024-11-24 11:35:21 +08:00
辉鸭蛋
026dcd4488 auto domain: tp & switch party 2024-11-24 02:45:49 +08:00
辉鸭蛋
382f31bbe7 auto domain: fix ocr region 2024-11-22 22:52:22 +08:00
辉鸭蛋
d34d24cd5e fix auto domain skip 2024-11-21 23:41:32 +08:00
辉鸭蛋
ef20a5448b fixed the issue where the pathing cannot be used properly when the resolution is below 1920x1080 2024-11-10 13:13:10 +08:00
辉鸭蛋
7c96adb591 improve low hp detection and resurrection logic
改进低血量检测和复活逻辑

在 `BetterGenshinImpact.csproj` 文件中,将 `<AssemblyVersion>` 从 `0.35.1` 更新为 `0.35.2`。

在 `AutoDomainTask.cs` 文件中:
- 添加了 `using BetterGenshinImpact.GameTask.Common.BgiVision;` 引用。
- 将 `IsLowHealth` 方法替换为 `Bv.CurrentAvatarIsLowHp(CaptureToRectArea())` 方法。
- 在 `catch` 语句中添加了异常日志记录 `Logger.LogDebug(e, "红血自动吃药检测时发生异常")`。
- 删除了 `IsLowHealth` 方法的实现。

在 `Avatar.cs` 文件中:
- 修改了 `using` 引用,添加了 `BetterGenshinImpact.Core.Recognition`。
- 在 `ThrowWhenDefeated` 方法中,将 `region.Find(AutoFightContext.Instance.FightAssets.ConfirmRa)` 替换为 `Bv.IsInRevivePrompt(region)` 方法,并添加了复活逻辑。

在 `PathExecutor.cs` 文件中:
- 在 `foreach` 循环中添加了 `await RecoverWhenLowHp();` 方法调用。
- 添加了 `RecoverWhenLowHp` 方法,用于检测并处理低血量恢复。

在 `TpTask.cs` 文件中:
- 添加了 `ReviveStatueOfTheSevenPointX` 和 `ReviveStatueOfTheSevenPointY` 静态变量,用于复活点的坐标。

在 `BvStatus.cs` 文件中:
- 添加了多个 `using` 引用。
- 在 `Bv` 类中添加了 `IsInRevivePrompt` 和 `CurrentAvatarIsLowHp` 方法,用于检测复苏提示和当前角色是否低血量。
2024-10-25 23:49:07 +08:00
辉鸭蛋
a4bc632ae7 ui test
新增任务类属性和配置页面,优化日志记录

在 `BetterGenshinImpact.csproj` 文件中,添加了两个新文件夹路径 `GameTask\OneDragon\` 和 `User\AutoPathing\`。

在多个任务类文件中(如 `AutoDomainTask.cs`、`AutoFightTask.cs`、`AutoGeniusInvokationTask.cs`、`AutoMusicGameTask.cs`、`AutoWoodTask.cs`),新增了 `Name` 属性。

在 `PickAroundHandler.cs` 文件中,优化了 `RunAsync` 方法的日志记录,并添加了超时检查。

在 `ISoloTask.cs` 文件中,新增了 `Name` 属性和 `Start` 方法的接口定义。

在 `OneDragonTaskItem.cs` 文件中,新增了 `ViewModel` 属性。

在 `OneDragonFlowPage.xaml` 文件中,右侧配置部分从 `StackPanel` 改为 `ContentControl`,并添加了 `DataTemplate` 以支持不同任务类型的配置页面。

在 `IViewModel.cs` 文件中,将 `IViewModel` 接口的访问修饰符从 `internal` 改为 `public`。

在 `OneDragonFlowViewModel.cs` 文件中,初始化了任务项的 `ViewModel` 属性。

在 `ScriptControlViewModel.cs` 文件中,移除了构造函数的 `HomePageViewModel` 参数。

新增了 `LoginConfigViewModel.cs` 和 `MailConfigViewModel.cs` 文件,定义了相应的 ViewModel 类。

新增了 `LoginConfigPage.xaml` 和 `MailConfigPage.xaml` 文件,定义了相应的 XAML 布局及其交互逻辑。
2024-10-19 17:42:58 +08:00
辉鸭蛋
11ec9bc45d refactor: CancellationTokenSource -> CancellationToken 2024-10-19 01:50:21 +08:00
ema
335b053b32 change: moved image assets to new folder 2024-09-30 10:12:13 +08:00
辉鸭蛋
7df330a9fb 低分辨率缩放 2024-09-24 01:18:26 +08:00
辉鸭蛋
d51139025b 便携营养袋 的判断进行前置,减少无意义的性能损耗 2024-09-23 22:21:12 +08:00
何杰泽
ff969abbc7 自动吃药 添加了是否携带食物的检测 2024-09-23 21:18:24 +08:00
辉鸭蛋
5a0f7226ed update ISoloTask
更新 Start 方法以接受 CancellationTokenSource 参数

这些更改主要是为了使 `Start` 方法能够接受 `CancellationTokenSource` 参数,从而更好地控制任务的取消操作。通过传递 `CancellationTokenSource`,可以在需要时取消正在运行的任务,提高了代码的灵活性和可控性。

具体更改包括:
- 将 `Start` 方法的签名从无参数更改为接受 `CancellationTokenSource` 参数。
- 在多个任务类(如 `AutoDomainTask.cs`、`AutoFightTask.cs`、`AutoGeniusInvokationTask.cs`、`AutoMusicGameTask.cs`、`AutoWoodTask.cs`)中,更新 `Start` 方法以接受并使用传入的 `CancellationTokenSource`。
- 在 `Duel.cs` 中,更新 `RunAsync` 和 `Run` 方法的参数以接受 `CancellationTokenSource`,并将 `Cts` 赋值为传入的 `cts`。
- 在 `ISoloTask.cs` 接口中,更新 `Start` 方法的签名以接受 `CancellationTokenSource` 参数。
- 在 `TaskRunner.cs` 中,调用 `soloTask.Start` 时传入 `CancellationContext.Instance.Cts` 作为参数。
2024-09-23 00:04:09 +08:00
辉鸭蛋
8bb1d728ff refactor: solo task 2024-09-22 23:56:39 +08:00
辉鸭蛋
8e44643a51 auto eat #649 2024-09-21 23:41:20 +08:00
何杰泽
d3f0f89da1 添加autoEat功能。 2024-09-19 08:24:41 +08:00
何杰泽
98da4e072c Merge remote-tracking branch 'origin/main' into iris-dev 2024-09-17 22:24:44 +08:00
何杰泽
a2adfe5b6f 修改自动秘境战斗策略,添加自动吃药任务。但是没进行判断。 2024-09-17 22:18:00 +08:00
辉鸭蛋
121bfbaa8e fix #608 2024-09-11 21:50:17 +08:00
qhy040404
c490d29aa1 code cleanup 2024-08-14 18:01:02 +08:00