Feature:Asynchronous Operation & Formatting Code

- Now the async operation is enabled!
- Code formatted by Resharper plugin <3
This commit is contained in:
Somebody
2024-07-22 17:12:03 +08:00
parent e983375620
commit 87d228eb79
793 changed files with 34764 additions and 40190 deletions

View File

@@ -1,39 +1,32 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EggLink.DanhengServer.Data.Excel
namespace EggLink.DanhengServer.Data.Excel;
[ResourceEntity("MessageItemConfig.json")]
public class MessageItemConfigExcel : ExcelResource
{
[ResourceEntity("MessageItemConfig.json")]
public class MessageItemConfigExcel : ExcelResource
public int ID { get; set; }
public List<int> NextItemIDList { get; set; } = [];
public int SectionID { get; set; }
[JsonIgnore] public int GroupID { get; set; }
public override int GetId()
{
public int ID { get; set; }
public List<int> NextItemIDList { get; set; } = [];
public int SectionID { get; set; }
return ID;
}
[JsonIgnore]
public int GroupID { get; set; }
public override void Loaded()
{
GameData.MessageItemConfigData.Add(ID, this);
}
public override int GetId()
public override void AfterAllDone()
{
if (GameData.MessageSectionConfigData.TryGetValue(SectionID, out var value))
{
return ID;
}
public override void Loaded()
{
GameData.MessageItemConfigData.Add(ID, this);
}
public override void AfterAllDone()
{
if (GameData.MessageSectionConfigData.TryGetValue(SectionID, out MessageSectionConfigExcel? value))
{
value.Items.Add(this);
GroupID = value.GroupID;
}
value.Items.Add(this);
GroupID = value.GroupID;
}
}
}
}