From 488834ccd3eb59c7cb02f32a60cd4c9e2ca320d3 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:52:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B9=B2=E5=91=98=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=BB=93=E6=9E=9C=E5=88=B0=E5=89=AA=E8=B4=B4?= =?UTF-8?q?=E6=9D=BF=E6=97=B6=E4=B8=A2=E5=A4=B1=E6=9C=AA=E6=8B=A5=E6=9C=89?= =?UTF-8?q?=E5=B9=B2=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/UI/ToolboxViewModel.cs | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/ViewModels/UI/ToolboxViewModel.cs b/src/MaaWpfGui/ViewModels/UI/ToolboxViewModel.cs index ed72de6698..587ae41787 100644 --- a/src/MaaWpfGui/ViewModels/UI/ToolboxViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/ToolboxViewModel.cs @@ -813,8 +813,32 @@ public class ToolboxViewModel : Screen return; } + var output = new List(); + var ids = OperBoxDataArray.ToDictionary(op => op.Id); + foreach (var (id, oper) in DataHelper.Operators) + { + if (DataHelper.IsCharacterAvailableInClient(oper, SettingsViewModel.GameSettings.ClientType)) + { + var name = DataHelper.GetLocalizedCharacterName(oper) ?? "???"; + if (ids.TryGetValue(id, out var value)) + { + output.Add(value); + } + else + { + output.Add(new OperBoxData.OperData() + { + Id = id, + Name = name, + Rarity = oper.Rarity, + Potential = 0, + }); + } + } + } + System.Windows.Forms.Clipboard.Clear(); - System.Windows.Forms.Clipboard.SetDataObject(JsonConvert.SerializeObject(OperBoxDataArray, Formatting.Indented)); + System.Windows.Forms.Clipboard.SetDataObject(JsonConvert.SerializeObject(output, Formatting.Indented)); OperBoxInfo = LocalizationHelper.GetString("CopiedToClipboard"); }