//------------------------------------------------------------------------------ // // 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 EventPartnerConfig : Bright.Config.BeanBase { public JSONNode json; public EventPartnerConfig(JSONNode _json) { { var __json0 = _json["InvitationCount"]; if(!__json0.IsArray) { throw new SerializationException(); } InvitationCount = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } InvitationCount.Add(__v0); } } { var __json0 = _json["RobotAgreeTime"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotAgreeTime = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotAgreeTime.Add(__v0); } } { if(!_json["RobotPointsMultiple"].IsNumber) { throw new SerializationException(); } RobotPointsMultiple = _json["RobotPointsMultiple"]; } { if(!_json["RobotPointsMultiple2"].IsNumber) { throw new SerializationException(); } RobotPointsMultiple2 = _json["RobotPointsMultiple2"]; } { var __json0 = _json["FriendRecommendParam1"]; if(!__json0.IsArray) { throw new SerializationException(); } FriendRecommendParam1 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FriendRecommendParam1.Add(__v0); } } { var __json0 = _json["FriendRecommendParam2"]; if(!__json0.IsArray) { throw new SerializationException(); } FriendRecommendParam2 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FriendRecommendParam2.Add(__v0); } } { if(!_json["FriendRecommendListRefreshTime"].IsNumber) { throw new SerializationException(); } FriendRecommendListRefreshTime = _json["FriendRecommendListRefreshTime"]; } { if(!_json["RobotRecommendTriggerCount"].IsNumber) { throw new SerializationException(); } RobotRecommendTriggerCount = _json["RobotRecommendTriggerCount"]; } { if(!_json["RobotRecommendCount"].IsNumber) { throw new SerializationException(); } RobotRecommendCount = _json["RobotRecommendCount"]; } { var __json0 = _json["RobotDailyActiveTimeWindow"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotDailyActiveTimeWindow = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotDailyActiveTimeWindow.Add(__v0); } } { var __json0 = _json["RobotSingleAddPointsTimeWindow"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotSingleAddPointsTimeWindow = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotSingleAddPointsTimeWindow.Add(__v0); } } { var __json0 = _json["RobotSingleAddPointsOperations"]; if(!__json0.IsArray) { throw new SerializationException(); } RobotSingleAddPointsOperations = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RobotSingleAddPointsOperations.Add(__v0); } } { if(!_json["RobotMaxActivationCountPer24h"].IsNumber) { throw new SerializationException(); } RobotMaxActivationCountPer24h = _json["RobotMaxActivationCountPer24h"]; } { if(!_json["AutoMatchCD"].IsNumber) { throw new SerializationException(); } AutoMatchCD = _json["AutoMatchCD"]; } { var __json0 = _json["AutoMatchLevelList"]; if(!__json0.IsArray) { throw new SerializationException(); } AutoMatchLevelList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } AutoMatchLevelList.Add(__v0); } } { var __json0 = _json["AutoMatchLevelRange"]; if(!__json0.IsArray) { throw new SerializationException(); } AutoMatchLevelRange = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } AutoMatchLevelRange.Add(__v0); } } { if(!_json["AutoMatchMaxTime"].IsNumber) { throw new SerializationException(); } AutoMatchMaxTime = _json["AutoMatchMaxTime"]; } json = _json; PostInit(); } public EventPartnerConfig(System.Collections.Generic.List InvitationCount, System.Collections.Generic.List RobotAgreeTime, int RobotPointsMultiple, int RobotPointsMultiple2, System.Collections.Generic.List FriendRecommendParam1, System.Collections.Generic.List FriendRecommendParam2, int FriendRecommendListRefreshTime, int RobotRecommendTriggerCount, float RobotRecommendCount, System.Collections.Generic.List RobotDailyActiveTimeWindow, System.Collections.Generic.List RobotSingleAddPointsTimeWindow, System.Collections.Generic.List RobotSingleAddPointsOperations, int RobotMaxActivationCountPer24h, int AutoMatchCD, System.Collections.Generic.List AutoMatchLevelList, System.Collections.Generic.List AutoMatchLevelRange, int AutoMatchMaxTime ) { this.InvitationCount = InvitationCount; this.RobotAgreeTime = RobotAgreeTime; this.RobotPointsMultiple = RobotPointsMultiple; this.RobotPointsMultiple2 = RobotPointsMultiple2; this.FriendRecommendParam1 = FriendRecommendParam1; this.FriendRecommendParam2 = FriendRecommendParam2; this.FriendRecommendListRefreshTime = FriendRecommendListRefreshTime; this.RobotRecommendTriggerCount = RobotRecommendTriggerCount; this.RobotRecommendCount = RobotRecommendCount; this.RobotDailyActiveTimeWindow = RobotDailyActiveTimeWindow; this.RobotSingleAddPointsTimeWindow = RobotSingleAddPointsTimeWindow; this.RobotSingleAddPointsOperations = RobotSingleAddPointsOperations; this.RobotMaxActivationCountPer24h = RobotMaxActivationCountPer24h; this.AutoMatchCD = AutoMatchCD; this.AutoMatchLevelList = AutoMatchLevelList; this.AutoMatchLevelRange = AutoMatchLevelRange; this.AutoMatchMaxTime = AutoMatchMaxTime; PostInit(); } public static EventPartnerConfig DeserializeEventPartnerConfig(JSONNode _json) { return new EventPartnerConfig(_json); } /// /// 每种类型的玩法中,匹配的队友数量 /// public System.Collections.Generic.List InvitationCount { get; private set; } /// /// 机器人同意时间(单位:秒) /// public System.Collections.Generic.List RobotAgreeTime { get; private set; } /// /// 【原始版】加的分必须是配置值的整数倍 /// public int RobotPointsMultiple { get; private set; } /// /// 【矿工版】加的分必须是配置值的整数倍 /// public int RobotPointsMultiple2 { get; private set; } /// /// 活跃好友数量 /// public System.Collections.Generic.List FriendRecommendParam1 { get; private set; } /// /// 推荐伙伴数量 /// public System.Collections.Generic.List FriendRecommendParam2 { get; private set; } /// /// 推荐伙伴列表刷新时间(单位:秒) /// public int FriendRecommendListRefreshTime { get; private set; } /// /// 用户发出N次邀请后,开始推荐机器人 /// public int RobotRecommendTriggerCount { get; private set; } /// /// 机器人占推荐列表的比例 /// public float RobotRecommendCount { get; private set; } /// /// 机器人单日活跃时间段(单位:秒) /// public System.Collections.Generic.List RobotDailyActiveTimeWindow { get; private set; } /// /// 机器人单次集中加分时间段(单位:秒) /// public System.Collections.Generic.List RobotSingleAddPointsTimeWindow { get; private set; } /// /// 机器人单次加分,分几次完成 /// public System.Collections.Generic.List RobotSingleAddPointsOperations { get; private set; } /// /// 机器人每24小时最多激活几次 /// public int RobotMaxActivationCountPer24h { get; private set; } /// /// 自动匹配的按钮冷却时间(单位:秒) /// public int AutoMatchCD { get; private set; } /// /// 自动匹配的等级分段 /// public System.Collections.Generic.List AutoMatchLevelList { get; private set; } /// /// 结组的匹配区间 /// public System.Collections.Generic.List AutoMatchLevelRange { get; private set; } /// /// 入池超过X秒,则自动与同组其他玩家匹配(单位:秒) /// public int AutoMatchMaxTime { get; private set; } public const int __ID__ = 1203476944; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { } public override string ToString() { return "{ " + "InvitationCount:" + Bright.Common.StringUtil.CollectionToString(InvitationCount) + "," + "RobotAgreeTime:" + Bright.Common.StringUtil.CollectionToString(RobotAgreeTime) + "," + "RobotPointsMultiple:" + RobotPointsMultiple + "," + "RobotPointsMultiple2:" + RobotPointsMultiple2 + "," + "FriendRecommendParam1:" + Bright.Common.StringUtil.CollectionToString(FriendRecommendParam1) + "," + "FriendRecommendParam2:" + Bright.Common.StringUtil.CollectionToString(FriendRecommendParam2) + "," + "FriendRecommendListRefreshTime:" + FriendRecommendListRefreshTime + "," + "RobotRecommendTriggerCount:" + RobotRecommendTriggerCount + "," + "RobotRecommendCount:" + RobotRecommendCount + "," + "RobotDailyActiveTimeWindow:" + Bright.Common.StringUtil.CollectionToString(RobotDailyActiveTimeWindow) + "," + "RobotSingleAddPointsTimeWindow:" + Bright.Common.StringUtil.CollectionToString(RobotSingleAddPointsTimeWindow) + "," + "RobotSingleAddPointsOperations:" + Bright.Common.StringUtil.CollectionToString(RobotSingleAddPointsOperations) + "," + "RobotMaxActivationCountPer24h:" + RobotMaxActivationCountPer24h + "," + "AutoMatchCD:" + AutoMatchCD + "," + "AutoMatchLevelList:" + Bright.Common.StringUtil.CollectionToString(AutoMatchLevelList) + "," + "AutoMatchLevelRange:" + Bright.Common.StringUtil.CollectionToString(AutoMatchLevelRange) + "," + "AutoMatchMaxTime:" + AutoMatchMaxTime + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }