//------------------------------------------------------------------------------
//
// 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
{
///
/// 1v1活动参数
///
public sealed partial class EventSoloConfig : Bright.Config.BeanBase
{
public JSONNode json;
public EventSoloConfig(JSONNode _json)
{
{ if(!_json["EventTime"].IsNumber) { throw new SerializationException(); } EventTime = _json["EventTime"]; }
{ if(!_json["InitTrophy"].IsNumber) { throw new SerializationException(); } InitTrophy = _json["InitTrophy"]; }
{ if(!_json["MinTrophy"].IsNumber) { throw new SerializationException(); } MinTrophy = _json["MinTrophy"]; }
{ if(!_json["ClaimRewardMatchCount"].IsNumber) { throw new SerializationException(); } ClaimRewardMatchCount = _json["ClaimRewardMatchCount"]; }
{ if(!_json["SettlementTime"].IsNumber) { throw new SerializationException(); } SettlementTime = _json["SettlementTime"]; }
{ var __json0 = _json["RobotBehaviorTimeDelay"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotBehaviorTimeDelay = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotBehaviorTimeDelay.Add(__v0); } }
{ if(!_json["MaxFailCount"].IsNumber) { throw new SerializationException(); } MaxFailCount = _json["MaxFailCount"]; }
{ if(!_json["StartTime"].IsNumber) { throw new SerializationException(); } StartTime = _json["StartTime"]; }
{ if(!_json["EndTime"].IsNumber) { throw new SerializationException(); } EndTime = _json["EndTime"]; }
{ if(!_json["MatchSwissLevel"].IsNumber) { throw new SerializationException(); } MatchSwissLevel = _json["MatchSwissLevel"]; }
{ if(!_json["MaxMatchTime"].IsNumber) { throw new SerializationException(); } MaxMatchTime = _json["MaxMatchTime"]; }
{ var __json0 = _json["MatchDelayTime"]; if(!__json0.IsArray) { throw new SerializationException(); } MatchDelayTime = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MatchDelayTime.Add(__v0); } }
{ if(!_json["MatchPlayerProb"].IsNumber) { throw new SerializationException(); } MatchPlayerProb = _json["MatchPlayerProb"]; }
{ if(!_json["ChooseRodTime"].IsNumber) { throw new SerializationException(); } ChooseRodTime = _json["ChooseRodTime"]; }
{ var __json0 = _json["RobotChooseRodTime"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotChooseRodTime = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotChooseRodTime.Add(__v0); } }
{ if(!_json["DuplicateFishRat"].IsNumber) { throw new SerializationException(); } DuplicateFishRat = _json["DuplicateFishRat"]; }
json = _json;
PostInit();
}
public EventSoloConfig(int EventTime, int InitTrophy, int MinTrophy, int ClaimRewardMatchCount, int SettlementTime, System.Collections.Generic.List RobotBehaviorTimeDelay, int MaxFailCount, int StartTime, int EndTime, int MatchSwissLevel, int MaxMatchTime, System.Collections.Generic.List MatchDelayTime, float MatchPlayerProb, int ChooseRodTime, System.Collections.Generic.List RobotChooseRodTime, int DuplicateFishRat )
{
this.EventTime = EventTime;
this.InitTrophy = InitTrophy;
this.MinTrophy = MinTrophy;
this.ClaimRewardMatchCount = ClaimRewardMatchCount;
this.SettlementTime = SettlementTime;
this.RobotBehaviorTimeDelay = RobotBehaviorTimeDelay;
this.MaxFailCount = MaxFailCount;
this.StartTime = StartTime;
this.EndTime = EndTime;
this.MatchSwissLevel = MatchSwissLevel;
this.MaxMatchTime = MaxMatchTime;
this.MatchDelayTime = MatchDelayTime;
this.MatchPlayerProb = MatchPlayerProb;
this.ChooseRodTime = ChooseRodTime;
this.RobotChooseRodTime = RobotChooseRodTime;
this.DuplicateFishRat = DuplicateFishRat;
PostInit();
}
public static EventSoloConfig DeserializeEventSoloConfig(JSONNode _json)
{
return new EventSoloConfig(_json);
}
///
/// 活动时间(单位:秒)
///
public int EventTime { get; private set; }
///
/// 初始杯数
///
public int InitTrophy { get; private set; }
///
/// 最低杯数
///
public int MinTrophy { get; private set; }
///
/// 每周至少完成X场对战才能领取赛季奖励
///
public int ClaimRewardMatchCount { get; private set; }
///
/// 结算时间(单位:秒)
///
public int SettlementTime { get; private set; }
///
/// 机器人发消息的延迟(单位:秒)
///
public System.Collections.Generic.List RobotBehaviorTimeDelay { get; private set; }
///
/// 每条鱼最多失败X次
///
public int MaxFailCount { get; private set; }
///
/// 开始倒计时(单位:秒)
///
public int StartTime { get; private set; }
///
/// 强制结束倒计时(单位:秒)
///
public int EndTime { get; private set; }
///
/// 瑞士轮规则匹配最大层数
///
public int MatchSwissLevel { get; private set; }
///
/// 匹配最大时间(单位:秒)
///
public int MaxMatchTime { get; private set; }
///
/// 匹配展示延迟
///
public System.Collections.Generic.List MatchDelayTime { get; private set; }
///
/// MatchPlayerProb
///
public float MatchPlayerProb { get; private set; }
///
/// 选择鱼竿时间(单位:秒)
///
public int ChooseRodTime { get; private set; }
///
/// 机器人选择鱼竿的时间(单位:秒)
///
public System.Collections.Generic.List RobotChooseRodTime { get; private set; }
///
/// 钓鱼序列中,最多重复鱼比例 ≤ X/100
///
public int DuplicateFishRat { get; private set; }
public const int __ID__ = -319221989;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "EventTime:" + EventTime + ","
+ "InitTrophy:" + InitTrophy + ","
+ "MinTrophy:" + MinTrophy + ","
+ "ClaimRewardMatchCount:" + ClaimRewardMatchCount + ","
+ "SettlementTime:" + SettlementTime + ","
+ "RobotBehaviorTimeDelay:" + Bright.Common.StringUtil.CollectionToString(RobotBehaviorTimeDelay) + ","
+ "MaxFailCount:" + MaxFailCount + ","
+ "StartTime:" + StartTime + ","
+ "EndTime:" + EndTime + ","
+ "MatchSwissLevel:" + MatchSwissLevel + ","
+ "MaxMatchTime:" + MaxMatchTime + ","
+ "MatchDelayTime:" + Bright.Common.StringUtil.CollectionToString(MatchDelayTime) + ","
+ "MatchPlayerProb:" + MatchPlayerProb + ","
+ "ChooseRodTime:" + ChooseRodTime + ","
+ "RobotChooseRodTime:" + Bright.Common.StringUtil.CollectionToString(RobotChooseRodTime) + ","
+ "DuplicateFishRat:" + DuplicateFishRat + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}