diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 13d9ce0517..2ad57f836d 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -573,8 +573,13 @@ namespace MaaWpfGui.Main case AsstMsg.TaskChainCompleted: switch (taskChain) { + case "Fight": + Instances.TaskQueueViewModel.FightTaskRunning = false; + break; case "Infrast": + Instances.TaskQueueViewModel.InfrastTaskRunning = false; Instances.TaskQueueViewModel.IncreaseCustomInfrastPlanIndex(); + Instances.TaskQueueViewModel.RefreshCustomInfrastPlanIndexByPeriod(); break; case "Mall": { diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs index 323a04f496..7bf2da1c10 100644 --- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs @@ -818,6 +818,7 @@ namespace MaaWpfGui.ViewModels.UI // 虽然更改时已经保存过了,不过保险起见还是在点击开始之后再保存一次任务及基建列表 TaskItemSelectionChanged(); Instances.SettingsViewModel.InfrastOrderSelectionChanged(); + RefreshCustomInfrastPlanIndexByPeriod(); ClearLog(); @@ -2623,7 +2624,7 @@ namespace MaaWpfGui.ViewModels.UI RefreshCustomInfrastPlanIndexByPeriod(); } - private void RefreshCustomInfrastPlanIndexByPeriod() + public void RefreshCustomInfrastPlanIndexByPeriod() { if (!CustomInfrastEnabled || !_customInfrastPlanHasPeriod || InfrastTaskRunning) {