mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
@@ -1623,7 +1623,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
public void SetFightParams()
|
||||
{
|
||||
var type = TaskType.Fight;
|
||||
var id = Instances.AsstProxy.TaskStatus.FirstOrDefault(t => t.Value == type).Key;
|
||||
var id = Instances.AsstProxy.TaskStatus.ToList().FirstOrDefault(t => t.Value == type).Key;
|
||||
if (!EnableSetFightParams || id == default)
|
||||
{
|
||||
return;
|
||||
@@ -1636,7 +1636,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
public static void SetFightRemainingSanityParams()
|
||||
{
|
||||
var type = TaskType.FightRemainingSanity;
|
||||
var id = Instances.AsstProxy.TaskStatus.FirstOrDefault(t => t.Value == type).Key;
|
||||
var id = Instances.AsstProxy.TaskStatus.ToList().FirstOrDefault(t => t.Value == type).Key;
|
||||
if (id == default)
|
||||
{
|
||||
return;
|
||||
@@ -1663,7 +1663,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
public static void SetInfrastParams()
|
||||
{
|
||||
const TaskType Type = TaskType.Infrast;
|
||||
int id = Instances.AsstProxy.TaskStatus.FirstOrDefault(i => i.Value == Type).Key;
|
||||
int id = Instances.AsstProxy.TaskStatus.ToList().FirstOrDefault(i => i.Value == Type).Key;
|
||||
if (id == default)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -241,10 +241,10 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
/// </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;
|
||||
Stage1 = StageList.FirstOrDefault(x => x.Value == Stage1)?.Value ?? string.Empty;
|
||||
Stage2 = StageList.FirstOrDefault(x => x.Value == Stage2)?.Value ?? string.Empty;
|
||||
Stage3 = StageList.FirstOrDefault(x => x.Value == Stage3)?.Value ?? string.Empty;
|
||||
RemainingSanityStage = RemainingSanityStageList.FirstOrDefault(x => x.Value == RemainingSanityStage)?.Value ?? string.Empty;
|
||||
}
|
||||
|
||||
private string _remainingSanityStage = ConfigurationHelper.GetValue(ConfigurationKeys.RemainingSanityStage, string.Empty) ?? string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user