Commit Graph

353 Commits

Author SHA1 Message Date
mfkvfhpdx
942bb3a6dd Merge branch 'babalae:main' into main 2025-01-01 20:56:24 +08:00
zjl
3eecea21aa 路径追踪支持 未知界面检查关闭,主要用来解决狗粮、或锄地捡物品,有小概率误触烹饪界面的问题。 2025-01-01 20:54:19 +08:00
辉鸭蛋
c95343e953 #846 daily reward party 2025-01-01 10:48:29 +08:00
辉鸭蛋
2d3395b491 typo & ui 2025-01-01 01:52:41 +08:00
辉鸭蛋
6432ff1aed fix key mouse 2024-12-29 17:08:08 +08:00
辉鸭蛋
54eecbe046 ui & log 2024-12-29 16:20:27 +08:00
辉鸭蛋
215f2ce450 Merge pull request #884 from mfkvfhpdx/main
路径追踪支持战斗配置
2024-12-28 23:02:17 +08:00
辉鸭蛋
621a91638a support weekly domain config 2024-12-28 22:06:50 +08:00
mfkvfhpdx
81a7518f72 暂停后按下的键会释放,增加战斗检查偏色配置,由于跟队伍无关,只在独立任务,自动战斗处设置。 2024-12-28 17:12:47 +08:00
zjl
a63ed2f2d2 路径追踪支持可配置 2024-12-27 21:46:52 +08:00
辉鸭蛋
733e5fb98a more settings 2024-12-23 00:37:04 +08:00
辉鸭蛋
08b921b982 one dragon configs 2024-12-22 23:24:11 +08:00
辉鸭蛋
e6e78aded0 fix pathing config ineffective 2024-12-22 21:07:06 +08:00
辉鸭蛋
d374a95bb8 new game loading 2024-12-22 14:56:25 +08:00
辉鸭蛋
e497f6ec79 1. 抽离部分内部类,格式化代码
2. ValueTuple 已过时,元组建议使用 ()
3. 暂停变量不建议放在 TaskContext.Instance().Config.Suspend 中,会被持久化到配置内
4. 修改一些方法和变量的存放位置
2024-12-21 14:35:42 +08:00
mfkvfhpdx
7c1568a809 Merge branch 'babalae:main' into main 2024-12-20 20:14:43 +08:00
辉鸭蛋
d5d65b7820 use system tick count instead of DateTime 2024-12-20 02:52:00 +08:00
zjl
36cbd168ed Merge branch 'main' of https://github.com/mfkvfhpdx/better-genshin-impact 2024-12-17 23:14:55 +08:00
zjl
5162bcc88f 参考失焦,增加了快捷键暂停。调度器任务支持从指定任务开始(右键 下一个任务从此执行,重启软件,或取出待执行任务后,该状态将会清空)。 2024-12-17 23:12:56 +08:00
辉鸭蛋
ec8fa6e824 KeyDown -> KeyUp 2024-12-14 20:52:19 +08:00
辉鸭蛋
3266b63187 alt use sendInput 2024-12-14 19:56:38 +08:00
辉鸭蛋
294d096229 fixed Alt does not take effect when playing macros 2024-12-14 18:59:16 +08:00
辉鸭蛋
48b5ab8af6 macro: add mouse wheel 2024-12-14 18:40:14 +08:00
辉鸭蛋
11dda84592 pick drops 2024-12-09 00:57:17 +08:00
辉鸭蛋
6cfa4b27a6 Merge pull request #835 from babalae/feat/new-camera
new camera orientation algorithm
2024-12-02 22:55:21 +08:00
辉鸭蛋
e2a25e4492 new camera orientation algorithm by https://github.com/Limint 2024-12-02 22:53:40 +08:00
辉鸭蛋
2383761b5d more js methods to expose 2024-12-01 16:43:42 +08:00
辉鸭蛋
fa9eacf4ac divide the path by tp point 2024-11-25 22:27:04 +08:00
辉鸭蛋
1cad8c3a00 pathing: config ui 2024-11-24 01:10:30 +08:00
辉鸭蛋
84629942bc pathing: use gadget #799 2024-11-24 00:49:49 +08:00
辉鸭蛋
a6f6ce55dd pathing: add OnlyInTeleportRecover config #779 2024-11-24 00:32:41 +08:00
辉鸭蛋
3c2739c5c5 add GoToAdventurersGuildTask
优化项目结构并新增任务和路径文件

主要更改:
- 在 `BetterGenshinImpact.csproj` 文件中,添加了对 `GameTask\Common\Element\Assets\Json\**` 目录的处理,并确保其内容始终复制到输出目录。
- 在 `RecognitionObject.cs` 文件中,新增了多个静态方法 `Ocr` 和一个静态实例 `OcrThis`。
- 在 `PathExecutor.cs` 文件中,优化了路径执行逻辑,新增 `GetPosition` 方法,并调整了超时判断。
- 在 `AutoPickAssets.cs` 文件中,添加了多个 `using` 语句,新增 `_logger` 和 `PickRo` 字段,并在构造函数中添加了自定义拾取按键的处理逻辑。
- 在 `AutoPickTrigger.cs` 文件中,移除了自定义拾取按键的初始化逻辑。
- 在 `OneKeyExpeditionTask.cs` 文件中,注释掉了 `Cv2.ImWrite` 方法的调用。
- 在 `TpTask.cs` 文件中,添加了点位很近时不切换的判断逻辑。
- 在 `BvSimpleOperation.cs` 文件中,新增了多个点击按钮的方法和 `FindF`、`FindFAndPress` 方法。
- 在 `BvStatus.cs` 文件中,新增了多个方法用于判断是否在对话界面并等待对话界面加载完成。
- 在 `GameTaskManager.cs` 文件中,添加了 `MapAssets.DestroyInstance` 方法的调用。
- 在 `HotKeyPageViewModel.cs` 文件中,注释掉了 `ElementalCollectHandler` 的测试代码,并添加了 `GoToAdventurersGuildTask` 的测试代码。
- 在 `TaskSettingsPageViewModel.cs` 文件中,更新了 `OnGoToAutoGeniusInvokationUrlAsync` 方法中的 URL。
- 添加了 `BetterGenshinImpact - Backup.csproj` 文件,配置了项目属性、资源文件和包引用。
- 添加了 `冒险家协会_枫丹.json`、`合成台_枫丹.json` 和 `合成台_璃月.json` 文件,定义了前往相应地点的路径和动作。
- 添加了 `ChooseTalkOptionTask.cs` 文件,实现了选择对话选项的任务。
- 添加了 `GoToAdventurersGuildTask.cs` 文件,实现了前往冒险家协会领取奖励的任务。
2024-11-10 22:49:55 +08:00
辉鸭蛋
648dfd3f41 ensure that the 'settings' object passed into JS is not empty 2024-11-10 13:22:56 +08:00
辉鸭蛋
435d04b52d pathing: add more settings 2024-11-10 00:51:47 +08:00
辉鸭蛋
19c7b10b01 fix repo update 2024-11-09 17:37:46 +08:00
辉鸭蛋
32bec1656b default pathing condition config 2024-11-05 22:50:34 +08:00
辉鸭蛋
003939bb94 js: fix no path pathing task
更新 PathingConditionConfig 和 PathingTask 方法以支持空值

将 PathingConditionConfig 类中的 FilterPartyName 方法的 materialName 参数类型从 string 改为 string?,以允许传入空值。增加了对 materialName 是否为空的检查,只有在 materialName 不为空时才进行条件匹配。将 PathingTask 类中的 GetMaterialName 方法的返回类型从 string 改为 string?,以允许返回空值。增加了对 FullPath 是否为空的检查,如果为空则返回 null。
2024-11-05 22:26:41 +08:00
辉鸭蛋
9c9bd7d138 js: extend click time
修改了 `GlobalMethod` 类中的 `Click` 方法,现在调用 `LeftButtonClick` 方法而不是 `Simulation.SendInput.Mouse.LeftButtonClick`。
修改了 `GlobalMethod` 类中的 `LeftButtonClick` 方法,现在使用 `Simulation.SendInput.Mouse.LeftButtonDown().Sleep(60).LeftButtonUp()` 代替 `Simulation.SendInput.Mouse.LeftButtonClick`。
修改了 `GlobalMethod` 类中的 `RightButtonClick` 方法,现在使用 `Simulation.SendInput.Mouse.RightButtonDown().Sleep(60).RightButtonUp()` 代替 `Simulation.SendInput.Mouse.RightButtonClick`。
2024-11-05 22:00:16 +08:00
辉鸭蛋
5b054bf31b 0.36.0 2024-11-04 21:33:07 +08:00
辉鸭蛋
a98934fc9a fix bug 2024-11-02 22:56:35 +08:00
辉鸭蛋
2b8f38b758 finsh pathing config 2024-11-02 21:03:58 +08:00
辉鸭蛋
2545581807 new pathing config 2024-11-02 19:49:38 +08:00
辉鸭蛋
dcd7831368 auto fix win11 bitblt 2024-11-02 12:57:58 +08:00
辉鸭蛋
4725af5491 impl js run task 2024-11-01 21:37:44 +08:00
辉鸭蛋
b74e09ac8b add continuous execution & add pathing ui right menu & real time updates of script repository
更新了 `BetterGenshinImpact.csproj` 文件中的 `WPF-UI.Violeta` 包版本,从 `3.0.5.21` 升级到 `3.0.5.23`。
在 `RepoWebBridge.cs` 文件中,注释掉了检查本地 `repo.json` 文件是否存在的代码,并直接调用 `ScriptRepoUpdater.Instance.UpdateCenterRepo()` 方法更新仓库。更新后的异常信息也进行了修改。
在 `MapPathingPage.xaml` 文件中,删除了 `ui:TreeListView` 控件的 `behavior:RightClickSelectBehavior.Enabled` 属性。
在 `ScriptControlPage.xaml` 文件中,添加了一个新的 `RowDefinition`,并在 `Grid` 中添加了一个新的 `ui:Button`,用于执行连续脚本组的命令。
在 `ScriptControlViewModel.cs` 文件中,添加了 `System.Windows.Media` 的引用。
在 `ScriptControlViewModel.cs` 文件中,添加了一个新的异步方法 `OnStartMultiScriptGroupAsync`,用于显示一个包含全选按钮和配置组复选框的对话框,并执行选中的脚本组。
2024-10-28 00:25:14 +08:00
辉鸭蛋
44190a522b team identification support online
修复错误信息,改进联机状态处理

更新了 `BetterGenshinImpact.csproj` 文件中的程序集版本号,从 `0.35.2` 更新为 `0.35.4`。

修正了 `ScriptProject.cs` 文件中抛出 `FileNotFoundException` 异常时的错误信息,将 "manifest.json文件存在" 改为 "manifest.json文件不存在"。

在 `AutoFightAssets.cs` 文件中:
- 为 `AvatarSideIconRectList` 和 `AvatarIndexRectList` 添加了注释,解释其在非联机状态下的用途。
- 添加了多个新的属性和注释,用于处理联机状态下的角色头像和对应的白色块位置。
- 初始化了 `OnePRa` 和 `PRa` 两个识别对象,用于识别联机状态下的1P和P图标。

在 `Avatar.cs` 文件中:
- 修改了角色切换逻辑,使用 `CombatScenes.ExpectedTeamAvatarNum` 替代硬编码的数字。
- 在 `TrySwitch` 方法中添加了 `needLog` 参数,并在切换成功时记录日志。
- 移除了部分注释代码,并在日志中保存了角色切换和索引区域的截图。
- 添加了 `System.Diagnostics` 的引用。

在 `CombatScenes.cs` 文件中:
- 将 `Avatars` 初始化为空数组。
- 添加了 `ExpectedTeamAvatarNum` 属性,默认值为4。
- 在 `InitializeTeam` 方法中添加了联机状态的判断和处理逻辑。
- 修改了队伍识别逻辑,使用动态数组替代固定长度的数组。
- 修改了 `CheckTeamInitialized` 方法,使用 `ExpectedTeamAvatarNum` 替代硬编码的数字。
- 修改了 `BuildAvatars` 方法,添加了对联机状态下角色编号位置信息的处理。
- 修改了 `SelectAvatar` 方法,使用 `GetValueOrDefault` 替代 `TryGetValue`。

在 `ScriptControlViewModel.cs` 文件中,设置 `WindowStartupLocation` 为 `WindowStartupLocation.CenterOwner`。

添加了 `1p.png` 和 `p.png` 两个新图像文件,用于识别联机状态下的1P和P图标。
2024-10-27 17:15:55 +08:00
辉鸭蛋
98d2664c28 auto pathing: use group config & fix bug 2024-10-27 00:51:10 +08:00
辉鸭蛋
72c2e38f94 add pathing settings for script group 2024-10-26 21:11:59 +08:00
辉鸭蛋
14a1d3be74 auto pathing: add settings ui 2024-10-25 01:17:00 +08:00
辉鸭蛋
94aae80046 auto pathing: optimize switch avatar
删除 `BetterGenshinImpact.csproj` 中的无用文件夹包含项。
将 `PathingConfig.cs` 中部分属性类型从 `int` 改为 `string`,并调整默认值。
在 `ScriptRepoUpdater.cs` 中用 `MessageBox` 替换 `ContentDialog`。
简化 `ElementalSkillHandler.cs` 和 `NormalAttackHandler.cs` 中的代码。
删除 `NahidaCollectHandler.cs` 中的切换角色代码。
在 `PathingTask.cs` 中添加 `HasAction` 方法。
在 `PathExecutor.cs` 中添加 `_actionAvatarIndexMap` 字典和多个新方法。
新增 `ReturnMainUiTask.cs` 任务类。
2024-10-24 23:05:52 +08:00