//------------------------------------------------------------------------------ // // 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 cfg { public sealed partial class Bait : Luban.BeanBase { public Bait(JSONNode _buf) { { if(!_buf["id"].IsNumber) { throw new SerializationException(); } Id = _buf["id"]; } { if(!_buf["efficacy_base"].IsNumber) { throw new SerializationException(); } EfficacyBase = _buf["efficacy_base"]; } { var __json0 = _buf["arr"]; if(!__json0.IsArray) { throw new SerializationException(); } Arr = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Arr.Add(__v0); } } { if(!_buf["strength"].IsNumber) { throw new SerializationException(); } Strength = _buf["strength"]; } } public static Bait DeserializeBait(JSONNode _buf) { return new Bait(_buf); } /// /// Id /// public readonly int Id; /// /// 吸引力 /// public readonly int EfficacyBase; /// /// 导线圈 /// public readonly System.Collections.Generic.List Arr; /// /// 强度 /// public readonly int Strength; public const int __ID__ = 2062794; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "efficacyBase:" + EfficacyBase + "," + "arr:" + Luban.StringUtil.CollectionToString(Arr) + "," + "strength:" + Strength + "," + "}"; } } }