mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 04:36:03 +08:00
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using EggLink.DanhengServer.Data.Custom;
|
|
using EggLink.DanhengServer.Enums.Rogue;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
namespace EggLink.DanhengServer.Data.Excel;
|
|
|
|
[ResourceEntity("RogueBuff.json")]
|
|
public class RogueBuffExcel : BaseRogueBuffExcel
|
|
{
|
|
public int AeonID { get; set; }
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public RogueBuffAeonTypeEnum BattleEventBuffType { get; set; } = RogueBuffAeonTypeEnum.Normal;
|
|
|
|
public bool IsAeonBuff => BattleEventBuffType != RogueBuffAeonTypeEnum.Normal;
|
|
|
|
public override void Loaded()
|
|
{
|
|
GameData.RogueBuffData.Add(GetId(), this);
|
|
|
|
if (BattleEventBuffType == RogueBuffAeonTypeEnum.BattleEventBuff)
|
|
{
|
|
GameData.RogueAeonBuffData.Add(AeonID, this);
|
|
}
|
|
else if (BattleEventBuffType == RogueBuffAeonTypeEnum.BattleEventBuffEnhance)
|
|
{
|
|
if (GameData.RogueAeonEnhanceData.TryGetValue(AeonID, out var aeonBuff))
|
|
aeonBuff.Add(this);
|
|
else
|
|
GameData.RogueAeonEnhanceData.Add(AeonID, [this]);
|
|
}
|
|
}
|
|
} |