diff --git a/UI/ModuleEditorControl.cs b/UI/ModuleEditorControl.cs index 48e67a0e..d66b688f 100644 --- a/UI/ModuleEditorControl.cs +++ b/UI/ModuleEditorControl.cs @@ -691,6 +691,7 @@ public sealed class ModuleEditorControl : UserControl _adjustmentTypeColumn.DisplayIndex = 1; _adjustmentsGrid.CellClick += OnAdjustmentsGridCellClick; + _adjustmentsGrid.CellFormatting += OnAdjustmentsGridCellFormatting; _adjustmentsGrid.CellPainting += OnAdjustmentsGridCellPainting; _adjustmentsGrid.CellValueChanged += OnAdjustmentsGridCellValueChanged; _adjustmentsGrid.DataError += (_, e) => e.ThrowException = false; @@ -1552,6 +1553,21 @@ public sealed class ModuleEditorControl : UserControl RefreshAdjustmentValidation(); } + private void OnAdjustmentsGridCellFormatting(object? sender, DataGridViewCellFormattingEventArgs e) + { + if (e.RowIndex < 0 + || e.ColumnIndex < 0 + || _adjustmentsGrid.Rows[e.RowIndex].IsNewRow + || _adjustmentsGrid.Columns[e.ColumnIndex].Name != "Condition") + { + return; + } + + // 动态数值条件沿用规则表的名称化显示;单元格底层仍保留 spellId 表达式供保存和运行。 + e.Value = FormatConditionExpressionForDisplay(e.Value?.ToString()); + e.FormattingApplied = true; + } + private IReadOnlyList BuildAdjustmentFields() { var fields = new List(); diff --git a/UI/StatusForm.cs b/UI/StatusForm.cs index a06a94f6..5fb30aa3 100644 --- a/UI/StatusForm.cs +++ b/UI/StatusForm.cs @@ -1691,7 +1691,8 @@ public sealed class StatusForm : Form continue; } - var summary = string.Join(" ", unitData.Select(kv => $"{kv.Key}: {UiTheme.FormatValue(kv.Value)}")); + var summary = string.Join(" ", unitData.Select(kv => + $"{DisplayPartyFieldName(kv.Key)}: {UiTheme.FormatValue(kv.Value)}")); items.Add(new ListViewItem(new[] { $"Unit {unitKey}", summary })); } } @@ -1699,6 +1700,16 @@ public sealed class StatusForm : Form ReplaceItems(_partyList, items); } + private static string DisplayPartyFieldName(string key) + { + if (!SpellFieldKey.TryParseAuraMember(key, out var spellId, out _)) + { + return key; + } + + return SpellIconCatalog.ResolveSuggestionName(spellId, null) ?? key; + } + private void UpdateUnitInfoList(RenderSnapshot snapshot) { var items = new List();