mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 04:36:03 +08:00
19 lines
692 B
C#
19 lines
692 B
C#
using Newtonsoft.Json.Linq;
|
|
|
|
namespace EggLink.DanhengServer.Data.Config.SummonUnit;
|
|
|
|
public class SummonUnitTriggerConfigInfo
|
|
{
|
|
//public UnitHintTriggerConfig HintTrigger;
|
|
//public PropSoundConfig SoundTrigger;
|
|
public List<UnitCustomTriggerConfigInfo> CustomTriggers { get; set; } = [];
|
|
|
|
public static SummonUnitTriggerConfigInfo LoadFromJsonObject(JObject obj)
|
|
{
|
|
SummonUnitTriggerConfigInfo info = new();
|
|
if (obj.ContainsKey(nameof(CustomTriggers)))
|
|
info.CustomTriggers = obj[nameof(CustomTriggers)]
|
|
?.Select(x => UnitCustomTriggerConfigInfo.LoadFromJsonObject((x as JObject)!)).ToList() ?? [];
|
|
return info;
|
|
}
|
|
} |