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,39 +1,31 @@
|
||||
using EggLink.DanhengServer.Enums.Rogue;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
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("DialogueDynamicContent.json")]
|
||||
public class DialogueDynamicContentExcel : ExcelResource
|
||||
{
|
||||
[ResourceEntity("DialogueDynamicContent.json")]
|
||||
public class DialogueDynamicContentExcel : ExcelResource
|
||||
public int DynamicContentID { get; set; }
|
||||
public int ArgID { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public DialogueDynamicParamTypeEnum DynamicParamType { get; set; }
|
||||
|
||||
public List<int> DynamicParamList { get; set; } = [];
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
public int DynamicContentID { get; set; }
|
||||
public int ArgID { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public DialogueDynamicParamTypeEnum DynamicParamType { get; set; }
|
||||
public List<int> DynamicParamList { get; set; } = [];
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return DynamicContentID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
if (GameData.DialogueDynamicContentData.TryGetValue(DynamicContentID, out Dictionary<int, DialogueDynamicContentExcel>? value))
|
||||
{
|
||||
value.Add(ArgID, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameData.DialogueDynamicContentData.Add(DynamicContentID, new() { { ArgID, this } });
|
||||
}
|
||||
}
|
||||
return DynamicContentID;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
if (GameData.DialogueDynamicContentData.TryGetValue(DynamicContentID, out var value))
|
||||
value.Add(ArgID, this);
|
||||
else
|
||||
GameData.DialogueDynamicContentData.Add(DynamicContentID,
|
||||
new Dictionary<int, DialogueDynamicContentExcel> { { ArgID, this } });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user