//------------------------------------------------------------------------------
//
// 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 TriggerPackManager : Bright.Config.BeanBase
{
public JSONNode json;
public TriggerPackManager(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["PackType"].IsNumber) { throw new SerializationException(); } PackType = _json["PackType"]; }
{ if(!_json["PackSubType"].IsNumber) { throw new SerializationException(); } PackSubType = _json["PackSubType"]; }
{ if(!_json["TimeDefinition"].IsObject) { throw new SerializationException(); } TimeDefinition = FishingEventType.DeserializeFishingEventType(_json["TimeDefinition"]); }
{ if(!_json["VIPBonus"].IsNumber) { throw new SerializationException(); } VIPBonus = _json["VIPBonus"]; }
{ if(!_json["MaxTrigger"].IsNumber) { throw new SerializationException(); } MaxTrigger = _json["MaxTrigger"]; }
{ if(!_json["Condition"].IsNumber) { throw new SerializationException(); } Condition = (ConditionType)_json["Condition"].AsInt; }
{ var __json0 = _json["Param"]; if(!__json0.IsArray) { throw new SerializationException(); } Param = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Param.Add(__v0); } }
{ var __json0 = _json["VIPPackList"]; if(!__json0.IsArray) { throw new SerializationException(); } VIPPackList = 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); } } VIPPackList.Add(__v0); } }
json = _json;
PostInit();
}
public TriggerPackManager(int ID, int PackType, int PackSubType, FishingEventType TimeDefinition, int VIPBonus, int MaxTrigger, ConditionType Condition, System.Collections.Generic.List Param, System.Collections.Generic.List> VIPPackList )
{
this.ID = ID;
this.PackType = PackType;
this.PackSubType = PackSubType;
this.TimeDefinition = TimeDefinition;
this.VIPBonus = VIPBonus;
this.MaxTrigger = MaxTrigger;
this.Condition = Condition;
this.Param = Param;
this.VIPPackList = VIPPackList;
PostInit();
}
public static TriggerPackManager DeserializeTriggerPackManager(JSONNode _json)
{
return new TriggerPackManager(_json);
}
public int ID { get; private set; }
///
/// 数字越小,拍脸图优先级越高
1:新手礼包
2:首充礼包
3:破冰体力礼包
4:体力不足礼包
5:广告券礼包
6:水族馆鱼卡礼包
7:新手礼包链
51:转盘券礼包
52:扑克券礼包
53:地图解锁礼包
///
public int PackType { get; private set; }
///
/// 见附录
///
public int PackSubType { get; private set; }
///
/// Forever:永久活动
LimitedTime:限时活动
UserRegistration:用户注册时间
Daily:日活动
Weekly:周活动
Cycle:周期循环活动
///
public FishingEventType TimeDefinition { get; private set; }
///
/// 下次刷新这个类别的礼包时等价VIP等级提升,可叠加
比如,每日礼包购买后,VIP等价会提升2,那么一个VIP等级为3的玩家,买了3个礼包后,转天会看到VIP等级为3 + 3 * 2 = 9的礼包
///
public int VIPBonus { get; private set; }
///
/// 这个礼包每天只能触发这么多次
///
public int MaxTrigger { get; private set; }
///
/// 见enum表
///
public ConditionType Condition { get; private set; }
///
/// 逗号隔开
///
public System.Collections.Generic.List Param { get; private set; }
public System.Collections.Generic.List> VIPPackList { get; private set; }
public const int __ID__ = -326487396;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
TimeDefinition?.Resolve(_tables);
PostResolve();
}
public void TranslateText(System.Func translator)
{
TimeDefinition?.TranslateText(translator);
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "PackType:" + PackType + ","
+ "PackSubType:" + PackSubType + ","
+ "TimeDefinition:" + TimeDefinition + ","
+ "VIPBonus:" + VIPBonus + ","
+ "MaxTrigger:" + MaxTrigger + ","
+ "Condition:" + Condition + ","
+ "Param:" + Bright.Common.StringUtil.CollectionToString(Param) + ","
+ "VIPPackList:" + Bright.Common.StringUtil.CollectionToString(VIPPackList) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}