mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
25 lines
722 B
C#
25 lines
722 B
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace EggLink.DanhengServer.Data.Excel;
|
|
|
|
[ResourceEntity("BattleEventData.json")]
|
|
public partial class BattleEventDataExcel : ExcelResource
|
|
{
|
|
public int BattleEventID { get; set; }
|
|
public string Config { get; set; } = "";
|
|
|
|
[GeneratedRegex(@"(?<=Avatar_RogueBattleevent)(.*?)(?=_Config.json)")]
|
|
private static partial Regex RegexConfig();
|
|
|
|
public override int GetId()
|
|
{
|
|
return BattleEventID;
|
|
}
|
|
|
|
public override void Loaded()
|
|
{
|
|
var match = RegexConfig().Match(Config);
|
|
if (match.Success && int.TryParse(match.Value, out var rogueBuffType))
|
|
GameData.RogueBattleEventData.TryAdd(rogueBuffType, this);
|
|
}
|
|
} |