diff --git a/src/MaaCore/MaaCore.vcxproj b/src/MaaCore/MaaCore.vcxproj index 52d220e77e..f5ed68d8ea 100644 --- a/src/MaaCore/MaaCore.vcxproj +++ b/src/MaaCore/MaaCore.vcxproj @@ -80,7 +80,6 @@ - @@ -257,7 +256,6 @@ - diff --git a/src/MaaCore/MaaCore.vcxproj.filters b/src/MaaCore/MaaCore.vcxproj.filters index bc079a14ad..bdba56d8c1 100644 --- a/src/MaaCore/MaaCore.vcxproj.filters +++ b/src/MaaCore/MaaCore.vcxproj.filters @@ -657,9 +657,6 @@ Source\Task\Infrast - - Source\Task\Miscellaneous - Source\Task\Miscellaneous @@ -1127,9 +1124,6 @@ Source\Task\Infrast - - Source\Task\Miscellaneous - Source\Task\Miscellaneous diff --git a/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.cpp b/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.cpp deleted file mode 100644 index 011f40381c..0000000000 --- a/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "CopilotListNotificationPlugin.h" - -bool asst::CopilotListNotificationPlugin::verify(AsstMsg msg, const json::value& details) const -{ - if (msg != AsstMsg::SubTaskStart || details.get("subtask", std::string()) != "ProcessTask") { - return false; - } - - const std::string task = details.at("details").at("task").as_string(); - if (task != "BattleStartAll" && task.starts_with("BattleStart")) { - return true; - } - else { - return false; - } -} - -bool asst::CopilotListNotificationPlugin::_run() -{ - json::value info = basic_info_with_what("CopilotListEnterSuccess"); - callback(AsstMsg::SubTaskExtraInfo, info); - - return true; -} diff --git a/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.h b/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.h deleted file mode 100644 index 6c47221d00..0000000000 --- a/src/MaaCore/Task/Miscellaneous/CopilotListNotificationPlugin.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once -#include "Task/AbstractTaskPlugin.h" - -namespace asst -{ - class CopilotListNotificationPlugin : public AbstractTaskPlugin - { - public: - using AbstractTaskPlugin::AbstractTaskPlugin; - virtual ~CopilotListNotificationPlugin() override = default; - virtual bool verify(AsstMsg msg, const json::value& details) const override; - - private: - virtual bool _run() override; - }; -} diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 702db74a98..96d4c8821a 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -601,6 +601,11 @@ namespace MaaWpfGui.Main _runningState.SetIdle(true); } + if (Instances.CopilotViewModel.UseCopilotList) + { + Instances.CopilotViewModel.CopilotTaskSuccess(); + } + Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("CompleteCombat"), UiLogColor.Info, showTime: true); } @@ -1220,10 +1225,6 @@ namespace MaaWpfGui.Main Instances.CopilotViewModel.AddLog($"Parse {subTaskDetails["file_name"]}[{subTaskDetails["stage_name"]}] Success"); break; - case "CopilotListEnterSuccess": - Instances.CopilotViewModel.EnterCopilotTask(); - break; - case "SSSStage": Instances.CopilotViewModel.AddLog("CurrentStage: " + subTaskDetails["stage"], UiLogColor.Info, showTime: true); break; diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index 09131b0639..bd9302dfdb 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -449,7 +449,7 @@ namespace MaaWpfGui.ViewModels.UI } /// - /// Import copilot json files from dictionary + /// 批量导入作业 /// // ReSharper disable once UnusedMember.Global public async void ImportFiles() @@ -812,7 +812,10 @@ namespace MaaWpfGui.ViewModels.UI } } - public void EnterCopilotTask() + /// + /// 战斗列表的当前战斗任务成功 + /// + public void CopilotTaskSuccess() { Application.Current.Dispatcher.InvokeAsync(() => {