mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
perf: 自动战斗自动编队期间如有干员属性要求被忽略, 则禁用自动化投票
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -365,6 +365,11 @@ public partial class CopilotViewModel : Screen
|
||||
/// </summary>
|
||||
public bool IgnoreRequirements { get => field; set => SetAndNotify(ref field, value); }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether 真正有干员被忽略了要求
|
||||
/// </summary>
|
||||
public bool HasRequirementIgnored { get; set; } = false;
|
||||
|
||||
public bool UseSanityPotion { get => field; set => SetAndNotify(ref field, value); }
|
||||
|
||||
/// <summary>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user