Fix Basic Rogue Event

This commit is contained in:
Somebody
2024-08-10 15:16:29 +08:00
parent fe7c51c996
commit b8e7b41d5e
37 changed files with 225 additions and 101 deletions

View File

@@ -1,31 +0,0 @@
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);
}
}

View File

@@ -0,0 +1,28 @@
using EggLink.DanhengServer.Data.Config;
using EggLink.DanhengServer.Data.Config.Rogue;
namespace EggLink.DanhengServer.Data.Excel;
[ResourceEntity("RogueNPC.json")]
public class RogueNPCExcel : ExcelResource
{
public int RogueNPCID { get; set; }
public string NPCJsonPath { get; set; } = string.Empty;
public RogueNPCConfigInfo? RogueNpcConfig { get; set; }
public override int GetId()
{
return RogueNPCID;
}
public override void Loaded()
{
GameData.RogueNPCData.TryAdd(RogueNPCID, this);
}
public bool CanUseInVer(int version)
{
return RogueNpcConfig != null;
}
}