From e32c580c76e06accfef7f6ea086f2fc6b8cbe044 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:28:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9A=E6=97=B6=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=90=AF=E5=8A=A8=E6=97=A0=E6=B3=95=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=9F=BA=E5=BB=BA=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #6757 --- src/MaaWpfGui/Main/AsstProxy.cs | 5 +++++ src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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) {