Files
DanhengServer-OpenSource/Common/Data/Excel/AvatarSkillTreeConfigExcel.cs
Somebody 87d228eb79 Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled!
- Code formatted by Resharper plugin <3
2024-07-22 17:12:03 +08:00

24 lines
748 B
C#

namespace EggLink.DanhengServer.Data.Excel;
[ResourceEntity("AvatarSkillTreeConfig.json")]
public class AvatarSkillTreeConfigExcel : ExcelResource
{
public int PointID { get; set; }
public int Level { get; set; }
public int AvatarID { get; set; }
public bool DefaultUnlock { get; set; }
public int MaxLevel { get; set; }
public override int GetId()
{
return PointID * 10 + Level;
}
public override void AfterAllDone()
{
GameData.AvatarConfigData.TryGetValue(AvatarID, out var excel);
if (excel != null && DefaultUnlock) excel.DefaultSkillTree.Add(this);
if (excel != null) excel.SkillTree.Add(this);
GameData.AvatarSkillTreeConfigData.Add(GetId(), this);
}
}