diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 88183bd6b2..882560c9e7 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -2042,6 +2042,7 @@ public class AsstProxy case "BattleFormationOperUnavailable": { + Instances.CopilotViewModel.HasRequirementIgnored = true; var oper_name = DataHelper.GetLocalizedCharacterName(subTaskDetails!["oper_name"]?.ToString()); var requirement_type = subTaskDetails["requirement_type"]?.ToString() switch { "level" => LocalizationHelper.GetString("BattleFormationOperUnavailable.Level"), @@ -2083,6 +2084,7 @@ public class AsstProxy case "CopilotListLoadTaskFileSuccess": Instances.CopilotViewModel.AddLog($"Parse {subTaskDetails!["file_name"]}[{subTaskDetails["stage_name"]}] Success"); + Instances.CopilotViewModel.HasRequirementIgnored = false; break; case "SSSStage": diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index 0ae18dd6bb..bdb5df7312 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -365,6 +365,11 @@ public partial class CopilotViewModel : Screen /// public bool IgnoreRequirements { get => field; set => SetAndNotify(ref field, value); } + /// + /// Gets or sets a value indicating whether 真正有干员被忽略了要求 + /// + public bool HasRequirementIgnored { get; set; } = false; + public bool UseSanityPotion { get => field; set => SetAndNotify(ref field, value); } /// @@ -1699,7 +1704,7 @@ public partial class CopilotViewModel : Screen model.IsChecked = false; - if (model.CopilotId > 0 && _copilotIdList.Remove(model.CopilotId) && _copilotIdList.IndexOf(model.CopilotId) == -1 && !IgnoreRequirements) + if (model.CopilotId > 0 && _copilotIdList.Remove(model.CopilotId) && _copilotIdList.IndexOf(model.CopilotId) == -1 && !HasRequirementIgnored) { _ = RateCopilot(model.CopilotId); }