//------------------------------------------------------------------------------ // // 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.BlacksmithData { public sealed partial class LevelWaveData : Luban.BeanBase { public LevelWaveData(JSONNode _buf) { { if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; } { if(!_buf["Levels"].IsNumber) { throw new SerializationException(); } Levels = _buf["Levels"]; } { if(!_buf["Wave"].IsNumber) { throw new SerializationException(); } Wave = _buf["Wave"]; } { if(!_buf["Appear"].IsNumber) { throw new SerializationException(); } Appear = _buf["Appear"]; } { if(!_buf["Conditional"].IsNumber) { throw new SerializationException(); } Conditional = _buf["Conditional"]; } { var __json0 = _buf["Monsters"]; if(!__json0.IsArray) { throw new SerializationException(); } Monsters = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Monsters.Add(__v0); } } { if(!_buf["Coefficient"].IsNumber) { throw new SerializationException(); } Coefficient = _buf["Coefficient"]; } { if(!_buf["Monsterall"].IsNumber) { throw new SerializationException(); } Monsterall = _buf["Monsterall"]; } { var __json0 = _buf["MonsterWeight"]; if(!__json0.IsArray) { throw new SerializationException(); } MonsterWeight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MonsterWeight.Add(__v0); } } { if(!_buf["Drop"].IsNumber) { throw new SerializationException(); } Drop = _buf["Drop"]; } } public static LevelWaveData DeserializeLevelWaveData(JSONNode _buf) { return new BlacksmithData.LevelWaveData(_buf); } /// /// ID /// public readonly int ID; /// /// 关卡数 /// public readonly int Levels; /// /// 对应波次 /// public readonly int Wave; /// /// 出怪条件 /// public readonly int Appear; /// /// 条件系数 /// public readonly int Conditional; /// /// 怪物ID /// public readonly System.Collections.Generic.List Monsters; /// /// 属性系数 /// public readonly float Coefficient; /// /// 怪物总数 /// public readonly int Monsterall; /// /// 出怪权重 /// public readonly System.Collections.Generic.List MonsterWeight; /// /// 波次掉落ID /// public readonly int Drop; public const int __ID__ = -511295193; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "ID:" + ID + "," + "Levels:" + Levels + "," + "Wave:" + Wave + "," + "Appear:" + Appear + "," + "Conditional:" + Conditional + "," + "Monsters:" + Luban.StringUtil.CollectionToString(Monsters) + "," + "Coefficient:" + Coefficient + "," + "Monsterall:" + Monsterall + "," + "MonsterWeight:" + Luban.StringUtil.CollectionToString(MonsterWeight) + "," + "Drop:" + Drop + "," + "}"; } } }