//------------------------------------------------------------------------------
//
// 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 Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg
{
public sealed partial class RodLevelup : Bright.Config.BeanBase
{
public JSONNode json;
public RodLevelup(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["MaxLevel"].IsNumber) { throw new SerializationException(); } MaxLevel = _json["MaxLevel"]; }
{ var __json0 = _json["Millestones"]; if(!__json0.IsArray) { throw new SerializationException(); } Millestones = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Millestones.Add(__v0); } }
{ var __json0 = _json["LevelupBasicStats"]; if(!__json0.IsArray) { throw new SerializationException(); } LevelupBasicStats = new System.Collections.Generic.List>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { System.Collections.Generic.List __v0; { var __json1 = __e0; if(!__json1.IsArray) { throw new SerializationException(); } __v0 = new System.Collections.Generic.List(__json1.Count); foreach(JSONNode __e1 in __json1.Children) { int __v1; { if(!__e1.IsNumber) { throw new SerializationException(); } __v1 = __e1; } __v0.Add(__v1); } } LevelupBasicStats.Add(__v0); } }
{ var __json0 = _json["LevelupConsume"]; if(!__json0.IsArray) { throw new SerializationException(); } LevelupConsume = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } LevelupConsume.Add(__v0); } }
json = _json;
PostInit();
}
public RodLevelup(int ID, int MaxLevel, System.Collections.Generic.List Millestones, System.Collections.Generic.List> LevelupBasicStats, System.Collections.Generic.List LevelupConsume )
{
this.ID = ID;
this.MaxLevel = MaxLevel;
this.Millestones = Millestones;
this.LevelupBasicStats = LevelupBasicStats;
this.LevelupConsume = LevelupConsume;
PostInit();
}
public static RodLevelup DeserializeRodLevelup(JSONNode _json)
{
return new RodLevelup(_json);
}
///
/// 对应鱼竿编号
///
public int ID { get; private set; }
public int MaxLevel { get; private set; }
///
/// 在这些等级时,需要升星才能继续提升等级
///
public System.Collections.Generic.List Millestones { get; private set; }
///
/// 分别对应RodBasicStats中1,2,3的顺序,可能1级内成长多个属性
///
public System.Collections.Generic.List> LevelupBasicStats { get; private set; }
///
/// 道具编号1003,逗号隔开
///
public System.Collections.Generic.List LevelupConsume { get; private set; }
public const int __ID__ = -2071374472;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "MaxLevel:" + MaxLevel + ","
+ "Millestones:" + Bright.Common.StringUtil.CollectionToString(Millestones) + ","
+ "LevelupBasicStats:" + Bright.Common.StringUtil.CollectionToString(LevelupBasicStats) + ","
+ "LevelupConsume:" + Bright.Common.StringUtil.CollectionToString(LevelupConsume) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}