mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
fix: wpf开始唤醒任务在未选择官服/B服时,不再提供账号切换输入
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
using MaaWpfGui.Main;
|
||||
using MaaWpfGui.Models.AsstTasks;
|
||||
using MaaWpfGui.Services;
|
||||
using MaaWpfGui.ViewModels.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MaaWpfGui.ViewModels.UserControl.TaskQueue;
|
||||
@@ -54,4 +57,23 @@ public class StartUpSettingsUserControlModel : TaskViewModel
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AccountSwitch") + $" -->> {details["details"]!["account_name"]}", UiLogColor.Info); // subTaskDetails!["current_account"]
|
||||
}
|
||||
}
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var clientType = SettingsViewModel.GameSettings.ClientType;
|
||||
var accountName = clientType switch
|
||||
{
|
||||
"Official" or "Bilibili" => AccountName,
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
var task = new AsstStartUpTask()
|
||||
{
|
||||
ClientType = clientType,
|
||||
StartGame = !string.IsNullOrEmpty(clientType),
|
||||
AccountName = accountName,
|
||||
};
|
||||
|
||||
return task.Serialize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user