//------------------------------------------------------------------------------
//
// 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 BattlePassMain : Bright.Config.BeanBase
{
public JSONNode json;
public BattlePassMain(JSONNode _json)
{
{ if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = _json["Id"]; }
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
{ if(!_json["ExpItem"].IsNumber) { throw new SerializationException(); } ExpItem = _json["ExpItem"]; }
{ var __json0 = _json["LevelList"]; if(!__json0.IsArray) { throw new SerializationException(); } LevelList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } LevelList.Add(__v0); } }
{ var __json0 = _json["RemindLevel"]; if(!__json0.IsArray) { throw new SerializationException(); } RemindLevel = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RemindLevel.Add(__v0); } }
{ if(!_json["PrimeIAPID"].IsNumber) { throw new SerializationException(); } PrimeIAPID = _json["PrimeIAPID"]; }
{ if(!_json["PrimeReward"].IsNumber) { throw new SerializationException(); } PrimeReward = _json["PrimeReward"]; }
{ if(!_json["DeluxeIAPID"].IsNumber) { throw new SerializationException(); } DeluxeIAPID = _json["DeluxeIAPID"]; }
{ if(!_json["DeluxeReward"].IsNumber) { throw new SerializationException(); } DeluxeReward = _json["DeluxeReward"]; }
{ var __json0 = _json["FreeRewardList"]; if(!__json0.IsArray) { throw new SerializationException(); } FreeRewardList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FreeRewardList.Add(__v0); } }
{ var __json0 = _json["PrimeRewardList"]; if(!__json0.IsArray) { throw new SerializationException(); } PrimeRewardList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } PrimeRewardList.Add(__v0); } }
{ var __json0 = _json["DailyTaskList"]; if(!__json0.IsArray) { throw new SerializationException(); } DailyTaskList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DailyTaskList.Add(__v0); } }
{ var __json0 = _json["WeeklyTaskList"]; if(!__json0.IsArray) { throw new SerializationException(); } WeeklyTaskList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } WeeklyTaskList.Add(__v0); } }
{ if(!_json["ExpPrice"].IsNumber) { throw new SerializationException(); } ExpPrice = _json["ExpPrice"]; }
{ if(!_json["BuyLevel"].IsNumber) { throw new SerializationException(); } BuyLevel = _json["BuyLevel"]; }
{ if(!_json["ExpToCash"].IsNumber) { throw new SerializationException(); } ExpToCash = _json["ExpToCash"]; }
json = _json;
PostInit();
}
public BattlePassMain(int Id, int Type, int ExpItem, System.Collections.Generic.List LevelList, System.Collections.Generic.List RemindLevel, int PrimeIAPID, int PrimeReward, int DeluxeIAPID, int DeluxeReward, System.Collections.Generic.List FreeRewardList, System.Collections.Generic.List PrimeRewardList, System.Collections.Generic.List DailyTaskList, System.Collections.Generic.List WeeklyTaskList, int ExpPrice, int BuyLevel, int ExpToCash )
{
this.Id = Id;
this.Type = Type;
this.ExpItem = ExpItem;
this.LevelList = LevelList;
this.RemindLevel = RemindLevel;
this.PrimeIAPID = PrimeIAPID;
this.PrimeReward = PrimeReward;
this.DeluxeIAPID = DeluxeIAPID;
this.DeluxeReward = DeluxeReward;
this.FreeRewardList = FreeRewardList;
this.PrimeRewardList = PrimeRewardList;
this.DailyTaskList = DailyTaskList;
this.WeeklyTaskList = WeeklyTaskList;
this.ExpPrice = ExpPrice;
this.BuyLevel = BuyLevel;
this.ExpToCash = ExpToCash;
PostInit();
}
public static BattlePassMain DeserializeBattlePassMain(JSONNode _json)
{
return new BattlePassMain(_json);
}
///
/// 主键
///
public int Id { get; private set; }
///
/// 1=普通战令
///
public int Type { get; private set; }
///
/// ItemID
///
public int ExpItem { get; private set; }
public System.Collections.Generic.List LevelList { get; private set; }
///
/// 达到X级还没激活
///
public System.Collections.Generic.List RemindLevel { get; private set; }
public int PrimeIAPID { get; private set; }
///
/// DropID
///
public int PrimeReward { get; private set; }
public int DeluxeIAPID { get; private set; }
///
/// DropID
///
public int DeluxeReward { get; private set; }
///
/// DropID
///
public System.Collections.Generic.List FreeRewardList { get; private set; }
///
/// DropID
///
public System.Collections.Generic.List PrimeRewardList { get; private set; }
///
/// BattlePassTask
///
public System.Collections.Generic.List DailyTaskList { get; private set; }
///
/// BattlePassTask
///
public System.Collections.Generic.List WeeklyTaskList { get; private set; }
///
/// 100经验=X钻
///
public int ExpPrice { get; private set; }
public int BuyLevel { get; private set; }
///
/// 100经验=Y钞票
///
public int ExpToCash { get; private set; }
public const int __ID__ = 1765783138;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Type:" + Type + ","
+ "ExpItem:" + ExpItem + ","
+ "LevelList:" + Bright.Common.StringUtil.CollectionToString(LevelList) + ","
+ "RemindLevel:" + Bright.Common.StringUtil.CollectionToString(RemindLevel) + ","
+ "PrimeIAPID:" + PrimeIAPID + ","
+ "PrimeReward:" + PrimeReward + ","
+ "DeluxeIAPID:" + DeluxeIAPID + ","
+ "DeluxeReward:" + DeluxeReward + ","
+ "FreeRewardList:" + Bright.Common.StringUtil.CollectionToString(FreeRewardList) + ","
+ "PrimeRewardList:" + Bright.Common.StringUtil.CollectionToString(PrimeRewardList) + ","
+ "DailyTaskList:" + Bright.Common.StringUtil.CollectionToString(DailyTaskList) + ","
+ "WeeklyTaskList:" + Bright.Common.StringUtil.CollectionToString(WeeklyTaskList) + ","
+ "ExpPrice:" + ExpPrice + ","
+ "BuyLevel:" + BuyLevel + ","
+ "ExpToCash:" + ExpToCash + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}