//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using Luban; using SimpleJSON; namespace TableConfig { public sealed partial class ConditionTable : Luban.BeanBase { public ConditionTable(JSONNode _buf) { { if(!_buf["Id"].IsNumber) { throw new SerializationException(); } Id = _buf["Id"]; } { if(!_buf["Name"].IsString) { throw new SerializationException(); } Name = _buf["Name"]; } { if(!_buf["Type"].IsNumber) { throw new SerializationException(); } Type = (ConditionType)_buf["Type"].AsInt; } { if(!_buf["TaskId"].IsNumber) { throw new SerializationException(); } TaskId = _buf["TaskId"]; } { var __json0 = _buf["PropItem"]; if(!__json0.IsArray) { throw new SerializationException(); } PropItem = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Item __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Item.DeserializeItem(__e0); } PropItem.Add(__v0); } } } public static ConditionTable DeserializeConditionTable(JSONNode _buf) { return new ConditionTable(_buf); } /// /// 条件id /// public readonly int Id; /// /// 条件名称 /// public readonly string Name; /// /// 条件类型 /// public readonly ConditionType Type; /// /// 任务Id /// public readonly int TaskId; /// /// 道具 /// public readonly System.Collections.Generic.List PropItem; public const int __ID__ = -1403411565; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { foreach (var _e in PropItem) { _e?.ResolveRef(tables); } } public override string ToString() { return "{ " + "Id:" + Id + "," + "Name:" + Name + "," + "Type:" + Type + "," + "TaskId:" + TaskId + "," + "PropItem:" + Luban.StringUtil.CollectionToString(PropItem) + "," + "}"; } } }