//------------------------------------------------------------------------------
//
// 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.BuffCfg
{
public sealed partial class DataBuff : Bright.Config.BeanBase
{
public DataBuff(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["GroupId"].IsNumber) { throw new SerializationException(); } GroupId = _json["GroupId"]; }
{ if(!_json["BuffEffectType"].IsNumber) { throw new SerializationException(); } BuffEffectType = (BuffCfg.EBuffEffectType)_json["BuffEffectType"].AsInt; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["RepeatType"].IsNumber) { throw new SerializationException(); } RepeatType = _json["RepeatType"]; }
{ if(!_json["BuffType"].IsNumber) { throw new SerializationException(); } BuffType = (BuffCfg.EBuffType)_json["BuffType"].AsInt; }
{ if(!_json["ExistType"].IsNumber) { throw new SerializationException(); } ExistType = (BuffCfg.EExistType)_json["ExistType"].AsInt; }
{ if(!_json["TriggerType"].IsNumber) { throw new SerializationException(); } TriggerType = (BuffCfg.ETriggerType)_json["TriggerType"].AsInt; }
{ if(!_json["MaxExistTime"].IsNumber) { throw new SerializationException(); } MaxExistTime = _json["MaxExistTime"]; }
{ if(!_json["TiggerUnitTime"].IsNumber) { throw new SerializationException(); } TiggerUnitTime = _json["TiggerUnitTime"]; }
{ var __json0 = _json["PorpParams"]; if(!__json0.IsArray) { throw new SerializationException(); } PorpParams = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { BuffCfg.EPropType __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = (BuffCfg.EPropType)__e0.AsInt; } PorpParams.Add(__v0); } }
{ var __json0 = _json["FloatParams"]; if(!__json0.IsArray) { throw new SerializationException(); } FloatParams = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FloatParams.Add(__v0); } }
PostInit();
}
public DataBuff(int ID, int GroupId, BuffCfg.EBuffEffectType BuffEffectType, string Name, int RepeatType, BuffCfg.EBuffType BuffType, BuffCfg.EExistType ExistType, BuffCfg.ETriggerType TriggerType, float MaxExistTime, float TiggerUnitTime, System.Collections.Generic.List PorpParams, System.Collections.Generic.List FloatParams )
{
this.ID = ID;
this.GroupId = GroupId;
this.BuffEffectType = BuffEffectType;
this.Name = Name;
this.RepeatType = RepeatType;
this.BuffType = BuffType;
this.ExistType = ExistType;
this.TriggerType = TriggerType;
this.MaxExistTime = MaxExistTime;
this.TiggerUnitTime = TiggerUnitTime;
this.PorpParams = PorpParams;
this.FloatParams = FloatParams;
PostInit();
}
public static DataBuff DeserializeDataBuff(JSONNode _json)
{
return new BuffCfg.DataBuff(_json);
}
///
/// 配置用ID
///
public int ID { get; private set; }
///
/// 分组id
///
public int GroupId { get; private set; }
///
/// buff效果类型
///
public BuffCfg.EBuffEffectType BuffEffectType { get; private set; }
///
/// Buff名字
///
public string Name { get; private set; }
///
/// 叠加类型
///
public int RepeatType { get; private set; }
///
/// Buff类型
///
public BuffCfg.EBuffType BuffType { get; private set; }
///
/// 持续类型
///
public BuffCfg.EExistType ExistType { get; private set; }
///
/// 触发类型
///
public BuffCfg.ETriggerType TriggerType { get; private set; }
///
/// 持续时间
///
public float MaxExistTime { get; private set; }
///
/// 触发周期
///
public float TiggerUnitTime { get; private set; }
///
/// buff辅助数值,属性字段
///
public System.Collections.Generic.List PorpParams { get; private set; }
///
/// buff辅助数值float
///
public System.Collections.Generic.List FloatParams { get; private set; }
public const int __ID__ = -228533862;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "GroupId:" + GroupId + ","
+ "BuffEffectType:" + BuffEffectType + ","
+ "Name:" + Name + ","
+ "RepeatType:" + RepeatType + ","
+ "BuffType:" + BuffType + ","
+ "ExistType:" + ExistType + ","
+ "TriggerType:" + TriggerType + ","
+ "MaxExistTime:" + MaxExistTime + ","
+ "TiggerUnitTime:" + TiggerUnitTime + ","
+ "PorpParams:" + Bright.Common.StringUtil.CollectionToString(PorpParams) + ","
+ "FloatParams:" + Bright.Common.StringUtil.CollectionToString(FloatParams) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}