mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 04:36:03 +08:00
Fix Basic Rogue Event
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
28
Common/Data/Excel/RogueNPCExcel.cs
Normal file
28
Common/Data/Excel/RogueNPCExcel.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user