迁移数据表到 Luban,移除 JsonNet、EnumUtility
This commit is contained in:
@@ -1,33 +1,40 @@
|
||||
using SepCore.DataTable;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public class PropItem
|
||||
{
|
||||
private readonly StatModifier[] _modifiers;
|
||||
private readonly List<modifier> _modifiers = new();
|
||||
public string Title { get; private set; }
|
||||
public string IconAssetName { get; private set; }
|
||||
public ItemRarity Rarity { get; private set; }
|
||||
public StatModifier[] Modifiers => _modifiers;
|
||||
public Rarity Rarity { get; private set; }
|
||||
public IReadOnlyList<modifier> Modifiers => _modifiers;
|
||||
|
||||
public PropItem(DRProp prop)
|
||||
public PropItem(PropConfig prop)
|
||||
{
|
||||
if (prop == null) return;
|
||||
|
||||
_modifiers = prop.Modifiers;
|
||||
if (prop.Modifiers != null)
|
||||
{
|
||||
_modifiers.AddRange(prop.Modifiers);
|
||||
}
|
||||
Title = prop.Title;
|
||||
Rarity = prop.Rarity;
|
||||
IconAssetName = prop.IconAssetName;
|
||||
}
|
||||
|
||||
public PropItem(StatModifier[] modifiers)
|
||||
public PropItem(IEnumerable<modifier> modifiers)
|
||||
{
|
||||
_modifiers = modifiers;
|
||||
if (modifiers != null)
|
||||
{
|
||||
_modifiers.AddRange(modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
public PropItem(StatModifier[] modifiers, ItemRarity rarity, string title, string iconAssetName)
|
||||
public PropItem(IEnumerable<modifier> modifiers, Rarity rarity, string title, string iconAssetName)
|
||||
{
|
||||
_modifiers = modifiers;
|
||||
if (modifiers != null)
|
||||
{
|
||||
_modifiers.AddRange(modifiers);
|
||||
}
|
||||
Title = title;
|
||||
Rarity = rarity;
|
||||
IconAssetName = iconAssetName;
|
||||
|
||||
Reference in New Issue
Block a user