//------------------------------------------------------------------------------ // // 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 BRandomProp : Luban.BeanBase { public BRandomProp(JSONNode _buf) { { if(!_buf["Propgroup"].IsNumber) { throw new SerializationException(); } Propgroup = _buf["Propgroup"]; } { var __json0 = _buf["Propid"]; if(!__json0.IsArray) { throw new SerializationException(); } Propid = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Propid.Add(__v0); } } { var __json0 = _buf["Typeweight"]; if(!__json0.IsArray) { throw new SerializationException(); } Typeweight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Typeweight.Add(__v0); } } { if(!_buf["Proplevel"].IsNumber) { throw new SerializationException(); } Proplevel = _buf["Proplevel"]; } { var __json0 = _buf["Levelweight"]; if(!__json0.IsArray) { throw new SerializationException(); } Levelweight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Levelweight.Add(__v0); } } { if(!_buf["Grids"].IsNumber) { throw new SerializationException(); } Grids = _buf["Grids"]; } { if(!_buf["Layers"].IsNumber) { throw new SerializationException(); } Layers = _buf["Layers"]; } { var __json0 = _buf["Layersweight"]; if(!__json0.IsArray) { throw new SerializationException(); } Layersweight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Layersweight.Add(__v0); } } } public static BRandomProp DeserializeBRandomProp(JSONNode _buf) { return new BRandomProp(_buf); } /// /// 道具组ID /// public readonly int Propgroup; /// /// 道具类型ID /// public readonly System.Collections.Generic.List Propid; /// /// 类型权重 /// public readonly System.Collections.Generic.List Typeweight; /// /// 最高等级 /// public readonly int Proplevel; /// /// 等级权重 /// public readonly System.Collections.Generic.List Levelweight; /// /// 占格数量 /// public readonly int Grids; /// /// 总共层数 /// public readonly int Layers; /// /// 层数占格权重 /// public readonly System.Collections.Generic.List Layersweight; public const int __ID__ = -525675352; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "Propgroup:" + Propgroup + "," + "Propid:" + Luban.StringUtil.CollectionToString(Propid) + "," + "Typeweight:" + Luban.StringUtil.CollectionToString(Typeweight) + "," + "Proplevel:" + Proplevel + "," + "Levelweight:" + Luban.StringUtil.CollectionToString(Levelweight) + "," + "Grids:" + Grids + "," + "Layers:" + Layers + "," + "Layersweight:" + Luban.StringUtil.CollectionToString(Layersweight) + "," + "}"; } } }