Commit Graph

333 Commits

Author SHA1 Message Date
ema
6b0746d2bd First update UI layout 2024-12-18 20:27:22 +08:00
辉鸭蛋
dd19afaca5 update ui 2024-12-08 00:46:48 +08:00
辉鸭蛋
c059611edb update ui 2024-12-06 00:32:52 +08:00
辉鸭蛋
f3e16fbb77 fixed #837 2024-12-04 01:58:50 +08:00
辉鸭蛋
99c8cd450e add claim mail 2024-12-04 01:33:17 +08:00
辉鸭蛋
dffccd0740 fix auto domain camera bug 2024-12-02 23:40:54 +08:00
辉鸭蛋
df84cc9ef1 add auto claim Battle Pass rewards 2024-11-29 20:37:27 +08:00
辉鸭蛋
d9faefd446 fix ArtifactSalvageTask 2024-11-29 01:37:41 +08:00
辉鸭蛋
67a418b984 one dragon: task series connection 2024-11-26 00:46:38 +08:00
辉鸭蛋
216c78d4d5 0.37.2 2024-11-25 22:50:45 +08:00
辉鸭蛋
968048baa9 new PickAroundHandler @Limint 2024-11-25 22:04:02 +08:00
辉鸭蛋
d7302b65c3 auto domain: tp & switch party & artifact salvage 2024-11-24 17:48:23 +08:00
辉鸭蛋
2a2acb5b0d auto skip: background skip use key (5.2) 2024-11-23 00:49:11 +08:00
辉鸭蛋
382f31bbe7 auto domain: fix ocr region 2024-11-22 22:52:22 +08:00
辉鸭蛋
e3689cd21a ui opt 2024-11-22 22:36:32 +08:00
辉鸭蛋
008f09cbe9 5.2 map 2024-11-20 22:49:35 +08:00
辉鸭蛋
b2db1e0b84 add GoToCraftingBenchTask
更新了 `BetterGenshinImpact.csproj` 文件中的程序集版本号,从 `0.36.2` 更新到 `0.36.3`。在 `ElementAssets.cs` 文件中,添加了 `CraftCondensedResin` 识别对象,并在 `ElementAssets` 类的构造函数中初始化了该对象。在 `ChooseTalkOptionTask.cs` 文件中,添加了 `BetterGenshinImpact.Core.Config` 的引用,并增加了在选项文本包含指定内容时保存截图的功能。修改了 `SelectLastOptionUntilEnd` 方法,增加了 `endAction` 参数和重试次数 `retry` 参数,并在循环中增加了对 `endAction` 的判断。修改了 `IsOrangeOption` 方法中的颜色阈值参数。在 `GoToAdventurersGuildTask.cs` 文件中,添加了 `Vanara.PInvoke` 的引用,并增加了等待对话界面的延迟时间和领取每日委托奖励后的点击操作。在 `HotKeyPageViewModel.cs` 文件中,修改了 `Test2Hotkey` 的回调函数,改为执行 `GoToCraftingBenchTask` 任务。

添加了多个命名空间引用,包括 `BetterGenshinImpact.Core.Config`、`BetterGenshinImpact.GameTask.AutoPathing`、`BetterGenshinImpact.GameTask.AutoPathing.Model`、`BetterGenshinImpact.GameTask.AutoSkip.Assets`、`BetterGenshinImpact.GameTask.AutoSkip`、`BetterGenshinImpact.GameTask.Common.BgiVision`、`Microsoft.Extensions.Logging`、`System`、`System.Threading`、`System.Threading.Tasks`、`BetterGenshinImpact.Core.Simulator`、`BetterGenshinImpact.GameTask.Common.Element.Assets` 和 `Vanara.PInvoke`。

新增了 `GoToCraftingBenchTask` 类,并定义了其命名空间 `BetterGenshinImpact.GameTask.Common.Job`。在 `GoToCraftingBenchTask` 类中,定义了 `Name` 属性,表示任务名称。定义了 `_retryTimes` 字段,表示重试次数。定义了 `_chooseTalkOptionTask` 字段,用于选择对话选项。新增了 `Start` 方法,接受 `country` 和 `CancellationToken` 参数,表示任务的开始。在 `Start` 方法中,添加了重试机制,调用 `DoOnce` 方法执行任务,并在异常情况下进行重试。新增了 `DoOnce` 方法,接受 `country` 和 `CancellationToken` 参数,表示单次任务的执行。在 `DoOnce` 方法中,定义了前往合成台、交互、等待合成界面、判断浓缩树脂是否存在等步骤。新增了 `GoToCraftingBench` 方法,接受 `country` 和 `CancellationToken` 参数,表示前往合成台的操作。在 `GoToCraftingBench` 方法中,使用 `PathingTask` 和 `PathExecutor` 执行路径任务。
2024-11-12 23:42:56 +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
辉鸭蛋
32bec1656b default pathing condition config 2024-11-05 22:50:34 +08:00
辉鸭蛋
c5de098865 new doc url 2024-11-03 22:26:14 +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
辉鸭蛋
e595b67d33 msg more info 2024-11-02 13:05:48 +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
辉鸭蛋
c461938ddd add elemental collect handler
在 `DefaultAutoFightConfig.cs` 中,将 `JsonSerializer.Deserialize` 替换为 `Newtonsoft.Json.JsonConvert.DeserializeObject` 来反序列化 `combat_avatar.json` 文件。

在 `ActionFactory.cs` 中,添加了 `BetterGenshinImpact.GameTask.AutoGeniusInvokation.Model` 的引用,并在 `ActionFactory` 类中添加了新的元素采集处理器(`hydro_collect`、`electro_collect`、`anemo_collect`)。

在 `HotKeyPageViewModel.cs` 中,添加了 `BetterGenshinImpact.GameTask.AutoGeniusInvokation.Model` 的引用,并修改了 `Test1Hotkey` 的处理逻辑,使用 `ElementalCollectHandler` 进行元素采集。

新增了 `ElementalCollectHandler.cs` 文件,定义了 `ElementalCollectHandler` 类,用于处理元素采集逻辑。该类根据元素类型筛选角色,并执行相应的攻击或技能操作。同时定义了 `ElementalCollectAvatar` 和 `ElementalCollectAvatarConfigs` 类,用于配置和管理不同元素类型的角色。
2024-11-01 01:47:10 +08:00
辉鸭蛋
b0d8e1a274 add condition settings 2024-10-31 23:06:40 +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
辉鸭蛋
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
辉鸭蛋
dd9433f565 update pathing ui 2024-10-27 23:47:26 +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
辉鸭蛋
404e7215fa add icon for pathing ui 2024-10-24 00:48:58 +08:00
辉鸭蛋
7cc4093079 refresh the ui after subscribing to the script
重构了多个类中的方法为异步方法,并增加了消息注册逻辑:
- `ScriptRepoUpdater.cs`:增加了检查并创建 `ReposPath` 目录的逻辑。
- `RepoWebBridge.cs`:引用新命名空间,重构 `GetRepoJson` 和 `ImportUri` 方法为异步方法,增加了检查和更新本地仓库的逻辑。
- `JsListViewModel.cs` 和 `MapPathingViewModel.cs`:引用新命名空间,增加消息注册逻辑,修正方法中的引用。
- `PathingTask.cs`:修正了日志记录中 `FileName` 的引用。
- `TaskSettingsPage.xaml`:更新了文本内容,增加了关于装备「王树瑞佑」的说明。
- 新增 `RefreshDataMessage.cs` 文件,定义了 `RefreshDataMessage` 类。
2024-10-21 01:32:36 +08:00
辉鸭蛋
81b754125a update ui 2024-10-20 10:51:41 +08:00
辉鸭蛋
29544507eb one dragon: fill
添加 OneDragon 相关 ViewModel 和页面,删除旧配置

在 `App.xaml.cs` 中添加了 `using BetterGenshinImpact.ViewModel.Pages.OneDragon` 语句,并在 `App` 类中添加了一系列 `OneDragon` 相关的 ViewModel 到服务集合中。
在 `OneDragonTaskItem.cs` 中调整了 `using` 语句的顺序,初始化了一些属性的默认值,并添加了两个构造函数。
删除了 `LoginConfigPage.xaml`、`LoginConfigPage.xaml.cs`、`MailConfigPage.xaml`、`MailConfigPage.xaml.cs`、`LoginConfigViewModel.cs` 和 `MailConfigViewModel.cs` 文件的内容。
在 `OneDragonFlowPage.xaml` 中更新了 `oneDragonView` 的命名空间,并添加了多个 `DataTemplate` 以支持新的 ViewModel。
在 `OneDragonFlowViewModel.cs` 中调整了 `using` 语句的顺序,并更新了 `_taskList` 的初始化内容。
添加了多个新的 ViewModel 文件,包括 `CraftViewModel.cs`、`DailyCommissionViewModel.cs`、`DailyRewardViewModel.cs`、`DomainViewModel.cs`、`ForgingViewModel.cs`、`LeyLineBlossomViewModel.cs`、`MailViewModel.cs`、`OneDragonBaseViewModel.cs`、`SereniteaPotViewModel.cs` 和 `TcgViewModel.cs`。
添加了多个新的页面文件,包括 `CraftPage.xaml`、`CraftPage.xaml.cs`、`DailyCommissionPage.xaml`、`DailyCommissionPage.xaml.cs`、`DailyRewardPage.xaml`、`DailyRewardPage.xaml.cs`、`DomainPage.xaml`、`DomainPage.xaml.cs`、`ForgingPage.xaml`、`ForgingPage.xaml.cs`、`LeyLineBlossomPage.xaml`、`LeyLineBlossomPage.xaml.cs`、`MailPage.xaml`、`MailPage.xaml.cs`、`SereniteaPotPage.xaml`、`SereniteaPotPage.xaml.cs` 和 `TcgPage.xaml`、`TcgPage.xaml.cs`。
2024-10-19 19:29:44 +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
辉鸭蛋
af7209af48 dispather ui : fix the issue of multi-level directories not being displayed
在 `TpTask.cs` 文件中:
- 修改了异常处理的日志记录逻辑。
- 修复了一个多余的 `}`。

在 `ScriptControlViewModel.cs` 文件中:
- 添加了新的 `using` 语句。
- 修改了 `OnAddPathing` 方法,替换了 `LoadAllPathingScripts` 方法。
- 重构了 `CreatePathingScriptSelectionPanel` 方法,修改了参数类型。
- 添加了 `AddNodesToPanel` 方法,用于递归添加节点。
- 修改了 `SetChildCheckBoxesState` 方法,增加了对嵌套 `StackPanel` 的处理。
- 修改了 `AddSelectedPathingScripts` 方法,调整了 `FileInfo` 的创建方式。
- 添加了对 `item.Project` 的空值检查。
- 添加了 `item.Project.LoadSettingUi` 方法的调用。
- 添加了 `oldItem.Projects.CollectionChanged` 事件的取消订阅。
2024-10-18 21:52:11 +08:00
辉鸭蛋
57989fd8b9 update ui 2024-10-18 19:57:39 +08:00
辉鸭蛋
9ad1062020 update one-stop service ui 2024-10-17 03:25:25 +08:00
辉鸭蛋
2ed7a883b3 One-stop service init 2024-10-17 02:48:21 +08:00
辉鸭蛋
5e16f48cf2 update pating ui 2024-10-13 20:51:02 +08:00
辉鸭蛋
b2cf62a21c add local script repo web
重构了 `AvatarClassifyGen.cs` 中的图像读取逻辑,现在只读取一个图像文件。`AllConfig.cs` 中添加了 `ScriptConfig` 类的配置,并监听其属性变化。`ScriptRepoUpdater.cs` 中引入了多个新命名空间,添加了 `_logger` 和 `_webWindow` 字段,新增了 `AutoUpdate` 方法,修改了 `UpdateCenterRepo` 方法,新增了 `FindCenterRepoPath`、`ImportScriptFromUri` 和 `OpenLocalRepoInWebView` 方法。`WebpagePanel.cs` 中添加了 `OnWebViewInitializedAction` 属性。`WebpageWindow.cs` 中注释掉了背景色设置。`MainWindow.xaml` 中修改了标题栏图标路径。`JsListPage.xaml`、`KeyMouseRecordPage.xaml` 和 `MapPathingPage.xaml` 中修改了按钮命令绑定。`MainWindowViewModel.cs` 中添加了 `AutoUpdate` 方法调用。`JsListViewModel.cs`、`KeyMouseRecordPageViewModel.cs` 和 `MapPathingViewModel.cs` 中添加了 `Config` 属性和 `OnOpenLocalScriptRepo` 命令。新增了 `ScriptConfig.cs` 和 `RepoWebBridge.cs` 文件,定义了 `ScriptConfig` 和 `RepoWebBridge` 类。
2024-10-13 18:13:28 +08:00
辉鸭蛋
c75dbbc241 add script repo downloader 2024-10-13 13:36:06 +08:00
辉鸭蛋
475b9bbd00 update ui text & ProxySpeedTester
删除了 `ClickOffset` 类及其相关代码。
在 `MainWindow.xaml` 中,将导航菜单项的内容从“脚本”更改为“JS 脚本”。
在 `JsListPage.xaml` 和 `KeyMouseRecordPage.xaml` 中,更新了文本内容,并添加了指向相关教程的超链接。
在 `JsListViewModel.cs` 和 `KeyMouseRecordPageViewModel.cs` 中,分别添加了 `OnGoToJsScriptUrl` 和 `OnGoToKmScriptUrl` 方法,用于打开对应的教程 URL。
新增了 `ProxySpeedTester.cs` 文件,包含一个用于测试代理速度的类 `ProxySpeedTester`,提供了获取最快代理地址的方法。
2024-10-10 21:58:35 +08:00