mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 12:46:03 +08:00
Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled! - Code formatted by Resharper plugin <3
This commit is contained in:
@@ -1,32 +1,24 @@
|
||||
namespace EggLink.DanhengServer.Data.Excel
|
||||
namespace EggLink.DanhengServer.Data.Excel;
|
||||
|
||||
[ResourceEntity("AvatarSkillTreeConfig.json")]
|
||||
public class AvatarSkillTreeConfigExcel : ExcelResource
|
||||
{
|
||||
[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()
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user