mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
@@ -915,6 +915,10 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
FightTask.Stage2 = stage2;
|
||||
FightTask.Stage3 = stage3;
|
||||
FightTask.RemainingSanityStage = rss;
|
||||
if (!FightTask.CustomStageCode)
|
||||
{
|
||||
FightTask.RemoveNonExistStage();
|
||||
}
|
||||
|
||||
Instances.TaskQueueViewModel.EnableSetFightParams = true;
|
||||
});
|
||||
@@ -1367,7 +1371,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
continue;
|
||||
}
|
||||
|
||||
AddLog(item.OriginalName + "Error", UiLogColor.Error);
|
||||
AddLog($"{LocalizationHelper.GetString(item.OriginalName)} task append error", UiLogColor.Error);
|
||||
taskRet = true;
|
||||
--count;
|
||||
}
|
||||
|
||||
@@ -229,11 +229,27 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
get => _customStageCode;
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
RemoveNonExistStage();
|
||||
}
|
||||
|
||||
SetAndNotify(ref _customStageCode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CustomStageCode, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除不在关卡列表中的关卡,关闭自定义和刷新关卡列表时调用
|
||||
/// </summary>
|
||||
public void RemoveNonExistStage()
|
||||
{
|
||||
Stage1 = StageList.Where(x => x.Value == Stage1).FirstOrDefault()?.Value ?? string.Empty;
|
||||
Stage2 = StageList.Where(x => x.Value == Stage2).FirstOrDefault()?.Value ?? string.Empty;
|
||||
Stage3 = StageList.Where(x => x.Value == Stage3).FirstOrDefault()?.Value ?? string.Empty;
|
||||
RemainingSanityStage = RemainingSanityStageList.Where(x => x.Value == RemainingSanityStage).FirstOrDefault()?.Value ?? string.Empty;
|
||||
}
|
||||
|
||||
private string _remainingSanityStage = ConfigurationHelper.GetValue(ConfigurationKeys.RemainingSanityStage, string.Empty) ?? string.Empty;
|
||||
|
||||
public string RemainingSanityStage
|
||||
|
||||
Reference in New Issue
Block a user