mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 04:36:03 +08:00
29 lines
840 B
C#
29 lines
840 B
C#
using EggLink.DanhengServer.Enums.Avatar;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
namespace EggLink.DanhengServer.Data.Excel;
|
|
|
|
[ResourceEntity("RelicMainAffixConfig.json")]
|
|
public class RelicMainAffixConfigExcel : ExcelResource
|
|
{
|
|
public int GroupID { get; set; }
|
|
public int AffixID { get; set; }
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public AvatarPropertyTypeEnum Property { get; set; }
|
|
|
|
public override int GetId()
|
|
{
|
|
return GroupID * 100 + AffixID;
|
|
}
|
|
|
|
public override void Loaded()
|
|
{
|
|
GameData.RelicMainAffixData.TryGetValue(GroupID, out var affixes);
|
|
if (affixes != null)
|
|
affixes[AffixID] = this;
|
|
else
|
|
GameData.RelicMainAffixData[GroupID] = new Dictionary<int, RelicMainAffixConfigExcel> { { AffixID, this } };
|
|
}
|
|
} |