//------------------------------------------------------------------------------
//
// 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 EventChallengeMain : Bright.Config.BeanBase
{
public JSONNode json;
public EventChallengeMain(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["RankTier"].IsNumber) { throw new SerializationException(); } RankTier = _json["RankTier"]; }
{ if(!_json["RobotNumber"].IsNumber) { throw new SerializationException(); } RobotNumber = _json["RobotNumber"]; }
{ var __json0 = _json["EliminateScore"]; if(!__json0.IsArray) { throw new SerializationException(); } EliminateScore = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } EliminateScore.Add(__v0); } }
{ var __json0 = _json["StageReward"]; if(!__json0.IsArray) { throw new SerializationException(); } StageReward = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } StageReward.Add(__v0); } }
{ if(!_json["WinnerReward"].IsNumber) { throw new SerializationException(); } WinnerReward = _json["WinnerReward"]; }
{ var __json0 = _json["FinalPlayer"]; if(!__json0.IsArray) { throw new SerializationException(); } FinalPlayer = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FinalPlayer.Add(__v0); } }
{ var __json0 = _json["FinalWeight"]; if(!__json0.IsArray) { throw new SerializationException(); } FinalWeight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FinalWeight.Add(__v0); } }
{ var __json0 = _json["FinalReward"]; if(!__json0.IsArray) { throw new SerializationException(); } FinalReward = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FinalReward.Add(__v0); } }
{ var __json0 = _json["RobotAccountList"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotAccountList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotAccountList.Add(__v0); } }
json = _json;
PostInit();
}
public EventChallengeMain(int ID, int RankTier, int RobotNumber, System.Collections.Generic.List EliminateScore, System.Collections.Generic.List StageReward, int WinnerReward, System.Collections.Generic.List FinalPlayer, System.Collections.Generic.List FinalWeight, System.Collections.Generic.List FinalReward, System.Collections.Generic.List RobotAccountList )
{
this.ID = ID;
this.RankTier = RankTier;
this.RobotNumber = RobotNumber;
this.EliminateScore = EliminateScore;
this.StageReward = StageReward;
this.WinnerReward = WinnerReward;
this.FinalPlayer = FinalPlayer;
this.FinalWeight = FinalWeight;
this.FinalReward = FinalReward;
this.RobotAccountList = RobotAccountList;
PostInit();
}
public static EventChallengeMain DeserializeEventChallengeMain(JSONNode _json)
{
return new EventChallengeMain(_json);
}
public int ID { get; private set; }
///
/// 从高到低
///
public int RankTier { get; private set; }
public int RobotNumber { get; private set; }
public System.Collections.Generic.List EliminateScore { get; private set; }
///
/// 填drop_id
///
public System.Collections.Generic.List StageReward { get; private set; }
///
/// 填drop_id
///
public int WinnerReward { get; private set; }
///
/// 瓜分大奖的人数
///
public System.Collections.Generic.List FinalPlayer { get; private set; }
///
/// 随机人数的权重
///
public System.Collections.Generic.List FinalWeight { get; private set; }
///
/// 实际获得的奖励
///
public System.Collections.Generic.List FinalReward { get; private set; }
///
/// 从Robot表中随机出这么多机器人
///
public System.Collections.Generic.List RobotAccountList { get; private set; }
public const int __ID__ = 472191074;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "RankTier:" + RankTier + ","
+ "RobotNumber:" + RobotNumber + ","
+ "EliminateScore:" + Bright.Common.StringUtil.CollectionToString(EliminateScore) + ","
+ "StageReward:" + Bright.Common.StringUtil.CollectionToString(StageReward) + ","
+ "WinnerReward:" + WinnerReward + ","
+ "FinalPlayer:" + Bright.Common.StringUtil.CollectionToString(FinalPlayer) + ","
+ "FinalWeight:" + Bright.Common.StringUtil.CollectionToString(FinalWeight) + ","
+ "FinalReward:" + Bright.Common.StringUtil.CollectionToString(FinalReward) + ","
+ "RobotAccountList:" + Bright.Common.StringUtil.CollectionToString(RobotAccountList) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}