Commit Graph

78 Commits

Author SHA1 Message Date
辉鸭蛋
a98934fc9a fix bug 2024-11-02 22:56:35 +08:00
辉鸭蛋
2545581807 new pathing config 2024-11-02 19:49:38 +08:00
辉鸭蛋
4cb5442161 add switch party task
在 `BetterGenshinImpact.csproj` 文件中,添加了两个新文件夹路径 `GameTask\OneDragon\` 和 `User\AutoPathing\`。

在 `BvStatus.cs` 文件中:
- 将 `WaitForMainUi` 方法的默认重试次数从 25 次减少到 10 次。
- 添加了 `IsInPartyViewUi` 和 `WaitForPartyViewUi` 方法。

在 `ElementAssets.cs` 文件中:
- 添加并初始化了 `PartyBtnChooseView` 和 `PartyBtnDelete` 两个新的识别对象。

在 `NewRetry.cs` 文件中:
- 添加了 `using System.Threading.Tasks;` 引用。
- 添加了 `WaitForAction` 方法。

在 `Region.cs` 文件中,添加了一个新的 `ClickTo` 方法,该方法接受 `double` 类型的参数。

在 `ReturnMainUiTask.cs` 文件中:
- 删除了旧的 `ReturnMainUiTask` 类。
- 添加了新的 `ReturnMainUiTask` 类,内容与旧的类似,但文件路径和命名空间有所变化。

在 `RunnerContext.cs` 文件中,移除了 `using BetterGenshinImpact.GameTask.OneDragon;` 引用,添加了 `using BetterGenshinImpact.GameTask.Common.Job;` 引用。

在 `HotKeyPageViewModel.cs` 文件中:
- 添加了多个 `using` 引用,包括 `using System.Threading.Tasks;` 和 `using BetterGenshinImpact.GameTask.Common.Job;`。
- 修改了多个方法的代码格式,使其更加简洁。
- 添加了多个新的快捷键设置。

添加了两个新的 PNG 图片文件 `party_btn_choose_view.png` 和 `party_btn_delete.png`。

在 `SwitchPartyTask.cs` 文件中,添加了新的 `SwitchPartyTask` 类,用于切换队伍。
2024-10-29 01:41:43 +08:00
辉鸭蛋
e4e7b37fd2 the whole team is defeated
在 `PathExecutor.cs` 中,`RecoverWhenLowHp` 方法进行了修改:
- 使用 `using` 语句来捕获区域。
- 如果当前角色血量过低,调用新的 `TpStatueOfTheSeven` 方法进行传送和恢复。
- 增加了一个新的分支,如果检测到复苏提示,点击复苏并等待主界面加载完成,然后再调用 `TpStatueOfTheSeven` 方法。
- 新增了 `TpStatueOfTheSeven` 方法,用于处理传送到七天神像并恢复血量的逻辑。

在 `BvStatus.cs` 中:
- 增加了 `System.Threading.Tasks` 和 `System.Threading` 的引用。
- 在 `Bv` 类中新增了 `WaitForMainUi` 方法,用于等待主界面加载完成。
- 在 `Bv` 类中新增了 `ClickIfInReviveModal` 方法,用于检测并点击复苏提示。
2024-10-26 00:21:51 +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
辉鸭蛋
11ec9bc45d refactor: CancellationTokenSource -> CancellationToken 2024-10-19 01:50:21 +08:00
辉鸭蛋
35264bc855 auto tp: throwing an exception when the tp point is not activated
在 `TpTask.cs` 文件中,添加了 `using BetterGenshinImpact.GameTask.Common.Exceptions;` 引用,并在 `TpTask` 类中添加了对 `TpPointNotActivate` 异常的处理逻辑,当传送点未激活或不存在时,按下 ESC 键返回大地图界面,并抛出异常。同时在 `ClickTpPoint` 方法中,修改了判断逻辑,增加了对传送点未激活或不存在的异常处理。

在 `MapAssets.cs`、`NewRetry.cs`、`TaskControl.cs` 文件中,将 `Exception` 修改为 `System.Exception`。

在 `NormalEndException.cs` 和 `RetryException.cs` 文件中,删除了旧的异常类定义,并重新添加了新的异常类定义。

在 `TpPointNotActivate.cs` 文件中,添加了新的异常类 `TpPointNotActivate`。
2024-09-29 21:37:54 +08:00
辉鸭蛋
5984adf015 auto pathing: add pick timer
更新地图特征点路径和UI文本,地图追踪时添加自动拾取

在 `FeatureStorage.cs` 中,将 `rootPath` 的路径从 `Global.Absolute(@"User\Map\");` 修改为 `Global.Absolute(@"Assets\Map\");`。
在 `Navigation.cs` 中,更新了日志信息的内容,使其更加明确首次加载速度较慢。
在 `BigMap.cs` 中,将 `FeatureMatcher` 的初始化参数从 `MapAssets.Instance.MainMap256BlockMat.Value` 修改为 `new Size(4096, 3328)`。
在 `MapPathingPage.xaml` 中,更新了部分 UI 文本,使其更加准确和清晰。例如,将“查看地图”修改为“查看实时追踪地图”,并在功能描述中添加了“尝鲜”字样。
在 `MapPathingPage.xaml` 中,注释掉了一个 `GridViewColumn`,该列包含了一个操作按钮。
在 `MapPathingViewModel.cs` 中,添加了 `using BetterGenshinImpact.Core.Script.Dependence.Model;` 引用。
在 `MapPathingViewModel.cs` 中,修改了 `TaskRunner` 的初始化参数,并在执行路径任务前添加了一个触发器。
在 `PickHandler.cs` 中,添加了一个新的类 `PickHandler`,并标记为 `[Obsolete]`,表示该类暂时不需要。
2024-09-08 20:28:50 +08:00
辉鸭蛋
4276957837 tp opt & F11 can cancel script task
优化日志记录和任务取消逻辑

在 `PathExecutor.cs` 中添加了 `using System.Diagnostics;` 语句。
注释掉了 `PathExecutor` 类中的部分日志信息。
将 `MoveTo` 和 `MoveCloseTo` 方法中的日志记录改为使用 `Debug.WriteLine`。
修改了 `MoveTo` 和 `MoveCloseTo` 方法中的循环条件,改为 `while (!cts.IsCancellationRequested)`。
将 `MoveTo` 方法中的超时时间从 30 秒改为 60 秒。
在 `TpTask.cs` 中增加了对配置项的最小值检查。
在 `MapAssets.cs` 中添加了新的地图坐标 `{ "纳塔", [8973.5, -1879.1] }`。
在 `HomePageViewModel.cs` 中添加了 `using BetterGenshinImpact.Core.Script;` 语句。
在 `HomePageViewModel` 类的 `Stop` 方法中,添加了取消独立任务的逻辑。
2024-09-08 19:44:34 +08:00
辉鸭蛋
a0691f1c19 auto pathing: add mapper viewer 2024-09-08 19:08:46 +08:00
辉鸭蛋
ca6994a720 auto pathing : first version 2024-09-08 15:16:02 +08:00
辉鸭蛋
cb09a369c2 auto pathing: fix jump and fly 2024-09-08 12:33:58 +08:00
辉鸭蛋
0056dcfc11 #558 2024-09-01 20:46:34 +08:00
辉鸭蛋
c5d5ccab0e fix: trigger may not obtain the latest screenshot 2024-09-01 20:23:10 +08:00
辉鸭蛋
36da78cb78 update map data to 5.0 2024-08-31 13:22:05 +08:00
辉鸭蛋
6651ec7d9f attempt to correct coordinates 2024-08-15 00:00:12 +08:00
辉鸭蛋
d4fe1f2ab0 add BfMatch instead of FlannMatch 2024-08-14 23:21:03 +08:00
辉鸭蛋
4e1a0673c9 fix GetMiniMapPositionByFeatureMatch = 0 2024-08-14 22:25:15 +08:00
qhy040404
c490d29aa1 code cleanup 2024-08-14 18:01:02 +08:00
辉鸭蛋
bc6ef4fa49 add comment 2024-08-14 00:15:25 +08:00
辉鸭蛋
eef5ff32cb add CameraOrientation.ComputeMiniMap(mat) 2024-08-14 00:14:04 +08:00
辉鸭蛋
644cdea7ee fix the accuracy issue of feature matching 2024-08-13 23:05:53 +08:00
辉鸭蛋
e1097199c4 map feature clear up 2024-08-13 01:07:53 +08:00
辉鸭蛋
059e21775f unified capture image method 2024-07-21 20:38:06 +08:00
辉鸭蛋
076a7596a0 refactor some code 2024-07-21 19:21:01 +08:00
辉鸭蛋
4243972eeb script async test 2024-07-21 12:42:39 +08:00
辉鸭蛋
9a76e5ad22 add common task runner 2024-07-20 21:57:39 +08:00
辉鸭蛋
6c1314cc4d add listview for KeyMouseRecordPage 2024-07-01 00:13:18 +08:00
辉鸭蛋
2cd71ff4a1 improve the speed of matching bigmap 2024-06-30 17:12:50 +08:00
辉鸭蛋
083fdd435f integrated recording and playback 2024-06-27 00:00:49 +08:00
辉鸭蛋
1097cc3eb8 auto track: more controller 2024-06-16 23:28:29 +08:00
辉鸭蛋
577abec2d2 simple auto tracking 2024-06-10 13:52:12 +08:00
辉鸭蛋
fc5d37670c auto map test 2024-06-06 00:44:52 +08:00
辉鸭蛋
19f2956633 add map tp 2024-06-02 01:09:57 +08:00
辉鸭蛋
a84c94c5ce add auto cook #266 2024-05-23 00:27:13 +08:00
辉鸭蛋
cb106db75f use 2048 block map 2024-05-22 15:38:13 +08:00
辉鸭蛋
92be667328 big map tp 2024-05-21 00:18:44 +08:00
辉鸭蛋
c544c18b07 test map tp 2024-05-05 19:12:01 +08:00
辉鸭蛋
bcec9cfc6b add new auto pick ocr engine 2024-05-04 19:31:47 +08:00
辉鸭蛋
7953a76b3d refactor: auto domain 2024-05-03 22:22:42 +08:00
辉鸭蛋
be99fb3605 refactor: auto fish 2024-05-03 20:10:43 +08:00
辉鸭蛋
c2d3e132e8 refactor: RectArea -> Region compilation passed 2024-05-02 14:45:07 +08:00
辉鸭蛋
116a4c8790 init way record 2024-04-21 23:03:40 +08:00
辉鸭蛋
f64e2f37c9 add feature matcher 2024-04-21 17:18:03 +08:00
辉鸭蛋
25e640bff1 block based feature matching 2024-04-21 13:49:25 +08:00
辉鸭蛋
27ff3e649b quick click genshin online yes or no button #170 2024-04-20 12:24:15 +08:00
辉鸭蛋
a458b86fab one key fight 2024-04-20 00:14:27 +08:00
辉鸭蛋
aa0fedf808 new avatar rec in auto fight 2024-04-13 18:46:18 +08:00
辉鸭蛋
c3ea13715a add black cancel btn #170 2024-04-06 18:43:12 +08:00
辉鸭蛋
d0405d0800 quick click genshin confirm or cancel button #170 2024-04-06 13:11:24 +08:00