//------------------------------------------------------------------------------
//
// 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 GameConfig.Battle
{
public sealed partial class BuffAttrConfig : Bright.Config.BeanBase
{
public BuffAttrConfig(JSONNode _json)
{
{ if(!_json["BuffID"].IsNumber) { throw new SerializationException(); } BuffID = _json["BuffID"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["StackNum"].IsNumber) { throw new SerializationException(); } StackNum = _json["StackNum"]; }
{ if(!_json["DurTime"].IsNumber) { throw new SerializationException(); } DurTime = _json["DurTime"]; }
{ if(!_json["ResultType"].IsNumber) { throw new SerializationException(); } ResultType = (Battle.BuffResultType)_json["ResultType"].AsInt; }
{ if(!_json["RemoveWhenDie"].IsNumber) { throw new SerializationException(); } RemoveWhenDie = _json["RemoveWhenDie"]; }
{ if(!_json["DotDamageData"].IsObject) { throw new SerializationException(); } DotDamageData = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(_json["DotDamageData"]); }
{ if(!_json["DotTickConfig"].IsObject) { throw new SerializationException(); } DotTickConfig = Battle.BuffDotTickConfig.DeserializeBuffDotTickConfig(_json["DotTickConfig"]); }
{ var __json0 = _json["AttrData"]; if(!__json0.IsArray) { throw new SerializationException(); } AttrData = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Battle.ResAttrImpactData __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Battle.ResAttrImpactData.DeserializeResAttrImpactData(__e0); } AttrData.Add(__v0); } }
PostInit();
}
public BuffAttrConfig(int BuffID, string name, int StackNum, float DurTime, Battle.BuffResultType ResultType, int RemoveWhenDie, Battle.SkillAttrDamageData DotDamageData, Battle.BuffDotTickConfig DotTickConfig, System.Collections.Generic.List AttrData )
{
this.BuffID = BuffID;
this.Name = name;
this.StackNum = StackNum;
this.DurTime = DurTime;
this.ResultType = ResultType;
this.RemoveWhenDie = RemoveWhenDie;
this.DotDamageData = DotDamageData;
this.DotTickConfig = DotTickConfig;
this.AttrData = AttrData;
PostInit();
}
public static BuffAttrConfig DeserializeBuffAttrConfig(JSONNode _json)
{
return new Battle.BuffAttrConfig(_json);
}
///
/// BuffID
///
public int BuffID { get; private set; }
///
/// 名字
///
public string Name { get; private set; }
///
/// 叠加次数
///
public int StackNum { get; private set; }
///
/// 持续时间
///
public float DurTime { get; private set; }
///
/// 数值效果类型
///
public Battle.BuffResultType ResultType { get; private set; }
///
/// 死亡消失
///
public int RemoveWhenDie { get; private set; }
public Battle.SkillAttrDamageData DotDamageData { get; private set; }
public Battle.BuffDotTickConfig DotTickConfig { get; private set; }
public System.Collections.Generic.List AttrData { get; private set; }
public const int __ID__ = 1652935996;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
DotDamageData?.Resolve(_tables);
DotTickConfig?.Resolve(_tables);
foreach(var _e in AttrData) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func translator)
{
DotDamageData?.TranslateText(translator);
DotTickConfig?.TranslateText(translator);
foreach(var _e in AttrData) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "BuffID:" + BuffID + ","
+ "Name:" + Name + ","
+ "StackNum:" + StackNum + ","
+ "DurTime:" + DurTime + ","
+ "ResultType:" + ResultType + ","
+ "RemoveWhenDie:" + RemoveWhenDie + ","
+ "DotDamageData:" + DotDamageData + ","
+ "DotTickConfig:" + DotTickConfig + ","
+ "AttrData:" + Bright.Common.StringUtil.CollectionToString(AttrData) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}