mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 刷理智使用源石 CheckBox 勾选后不生效
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using static MaaWpfGui.Main.AsstProxy;
|
||||
|
||||
namespace MaaWpfGui.Configuration.Single.MaaTask;
|
||||
@@ -22,7 +23,7 @@ namespace MaaWpfGui.Configuration.Single.MaaTask;
|
||||
/// <summary>
|
||||
/// 理智作战
|
||||
/// </summary>
|
||||
public class FightTask : BaseTask
|
||||
public class FightTask : BaseTask, IJsonOnDeserialized
|
||||
{
|
||||
public FightTask() => TaskType = TaskType.Fight;
|
||||
|
||||
@@ -132,4 +133,12 @@ public class FightTask : BaseTask
|
||||
public bool UseWeeklySchedule { get; set; }
|
||||
|
||||
public Dictionary<DayOfWeek, bool> WeeklySchedule { get; set; } = Enum.GetValues<DayOfWeek>().ToDictionary(i => i, _ => true);
|
||||
|
||||
public void OnDeserialized()
|
||||
{
|
||||
if (UseStoneAllowSave == false)
|
||||
{
|
||||
UseStone = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,12 +227,9 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel
|
||||
}
|
||||
|
||||
SetFightParams();
|
||||
if (GetTaskConfig<FightTask>().UseStoneAllowSave)
|
||||
{
|
||||
SetTaskConfig<FightTask>(t => t.UseStone == value, t => t.UseStone = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to use originiums.
|
||||
|
||||
Reference in New Issue
Block a user