- 为 20 个道具赋予中文名称(铁护腕、狂战士药剂等)
- 移除数据表 IconAssetName 列,改为按 `类型_{id}_icon`
的命名约定自动推导图标路径
- 清理旧图标资源(Almighty_Icon、172 系列)
- 同步更新各数据表 Excel 源文件
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using SepCore.Definition;
|
|
using Newtonsoft.Json;
|
|
using SepCore.CustomUtility;
|
|
using UnityGameFramework.Runtime;
|
|
|
|
namespace SepCore.DataTable
|
|
{
|
|
public class DRProp : DataRowBase
|
|
{
|
|
private int m_Id;
|
|
|
|
public override int Id => m_Id;
|
|
public string Title { get; private set; }
|
|
public string IconAssetName => $"prop_{m_Id}_icon";
|
|
public ItemRarity Rarity { get; private set; }
|
|
public int Price { get; private set; }
|
|
public float PriceRandomPercent { get; private set; }
|
|
public StatModifier[] Modifiers { get; private set; }
|
|
|
|
public override bool ParseDataRow(string dataRowString, object userData)
|
|
{
|
|
string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
|
int index = 0;
|
|
|
|
index++;
|
|
m_Id = int.Parse(fields[index++]);
|
|
index++;
|
|
Title = fields[index++];
|
|
Rarity = EnumUtility<ItemRarity>.Get(fields[index++]);
|
|
Price = int.Parse(fields[index++]);
|
|
PriceRandomPercent = float.Parse(fields[index++]);
|
|
Modifiers = JsonConvert.DeserializeObject<StatModifier[]>(fields[index++]);
|
|
|
|
return true;
|
|
}
|
|
}
|
|
} |