mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
物品列表移到末页,允许同名并改为字符串表
将物品列表页签放到技能列表右侧;添加与校验只禁止重复 itemId;保存格式改为 [itemId] = "名称"。 Co-authored-by: Wayne-Arasaka <waynebian01@users.noreply.github.com>
This commit is contained in:
@@ -371,9 +371,9 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
BuildStatesPage(),
|
||||
BuildAurasPage(),
|
||||
BuildSpellsPage(),
|
||||
BuildItemsPage(),
|
||||
BuildGroupPage(),
|
||||
BuildSpellsListPage()
|
||||
BuildSpellsListPage(),
|
||||
BuildItemsPage()
|
||||
};
|
||||
foreach (var page in pages)
|
||||
{
|
||||
@@ -400,7 +400,7 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
WriteBackItems();
|
||||
}
|
||||
|
||||
if (!_suppressUi && _editorTabIndex == 3)
|
||||
if (!_suppressUi && _editorTabIndex == 5)
|
||||
{
|
||||
_itemsListGrid.EndEdit();
|
||||
WriteBackItemsList();
|
||||
@@ -419,7 +419,7 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
var titles = new[] { "状态", "光环", "冷却", "物品列表", "队伍", "技能列表" };
|
||||
var titles = new[] { "状态", "光环", "冷却", "队伍", "技能列表", "物品列表" };
|
||||
for (var i = 0; i < titles.Length; i++)
|
||||
{
|
||||
var index = i;
|
||||
@@ -2451,17 +2451,6 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
return;
|
||||
}
|
||||
|
||||
if (_currentDocument.ItemsList.Any(item =>
|
||||
string.Equals(item.Name, suggestion.Name, StringComparison.Ordinal)))
|
||||
{
|
||||
MessageBox.Show(
|
||||
$"已有同名物品“{suggestion.Name}”。",
|
||||
"物品列表",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
var entry = new ClassBlocksStore.ItemsListEntry
|
||||
{
|
||||
ItemId = suggestion.ItemId,
|
||||
@@ -3517,7 +3506,6 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
}
|
||||
|
||||
var itemIds = new HashSet<long>();
|
||||
var itemNames = new HashSet<string>(StringComparer.Ordinal);
|
||||
foreach (DataGridViewRow row in _itemsListGrid.Rows)
|
||||
{
|
||||
if (row.IsNewRow)
|
||||
@@ -3546,12 +3534,6 @@ public sealed class ClassConfigEditorControl : UserControl
|
||||
error = $"物品列表 itemId {itemId} 重复。";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!itemNames.Add(name))
|
||||
{
|
||||
error = $"物品列表名称“{name}”重复。";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user