mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
fix: 自动战斗无法读取下拉列表中的作业
This commit is contained in:
@@ -212,6 +212,15 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
get => _filename;
|
||||
set
|
||||
{
|
||||
if (!File.Exists(value))
|
||||
{
|
||||
var resourceFile = Path.Combine(ResourceDir, "copilot", Path.GetFileName(value));
|
||||
if (File.Exists(resourceFile))
|
||||
{
|
||||
value = resourceFile;
|
||||
}
|
||||
}
|
||||
|
||||
SetAndNotify(ref _filename, value);
|
||||
ClearLog();
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
@@ -648,14 +657,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
int copilotId = 0;
|
||||
bool writeToCache = false;
|
||||
object? payload;
|
||||
if (!File.Exists(filename))
|
||||
{
|
||||
var resourceFile = Path.Combine(ResourceDir, "copilot", Path.GetFileName(filename));
|
||||
if (File.Exists(resourceFile))
|
||||
{
|
||||
filename = resourceFile;
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user