Files
DanhengServer-OpenSource/Common/Data/Excel/RogueNPCDialogueExcel.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

31 lines
917 B
C#

using EggLink.DanhengServer.Data.Config;
using Newtonsoft.Json;
namespace EggLink.DanhengServer.Data.Excel;
[ResourceEntity("RogueNPCDialogue.json")]
public class RogueNPCDialogueExcel : ExcelResource
{
public int RogueNPCID { get; set; }
public int DialogueProgress { get; set; }
public int HandbookEventID { get; set; }
public string DialoguePath { get; set; } = "";
[JsonIgnore] public DialogueInfo? DialogueInfo { get; set; }
public override int GetId()
{
return RogueNPCID * 100 + DialogueProgress;
}
public override void Loaded()
{
GameData.RogueNPCDialogueData.Add(GetId(), this);
}
public bool CanUseInVer(int version)
{
GameData.RogueHandBookEventData.TryGetValue(HandbookEventID, out var handbookEvent);
return DialogueInfo != null && handbookEvent != null && handbookEvent.EventTypeList.Contains(version);
}
}