141 lines
5.9 KiB
C#
141 lines
5.9 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
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<BuffCfg.EPropType>(__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<float>(__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<BuffCfg.EPropType> PorpParams, System.Collections.Generic.List<float> 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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 配置用ID
|
|
/// </summary>
|
|
public int ID { get; private set; }
|
|
/// <summary>
|
|
/// 分组id
|
|
/// </summary>
|
|
public int GroupId { get; private set; }
|
|
/// <summary>
|
|
/// buff效果类型
|
|
/// </summary>
|
|
public BuffCfg.EBuffEffectType BuffEffectType { get; private set; }
|
|
/// <summary>
|
|
/// Buff名字
|
|
/// </summary>
|
|
public string Name { get; private set; }
|
|
/// <summary>
|
|
/// 叠加类型
|
|
/// </summary>
|
|
public int RepeatType { get; private set; }
|
|
/// <summary>
|
|
/// Buff类型
|
|
/// </summary>
|
|
public BuffCfg.EBuffType BuffType { get; private set; }
|
|
/// <summary>
|
|
/// 持续类型
|
|
/// </summary>
|
|
public BuffCfg.EExistType ExistType { get; private set; }
|
|
/// <summary>
|
|
/// 触发类型
|
|
/// </summary>
|
|
public BuffCfg.ETriggerType TriggerType { get; private set; }
|
|
/// <summary>
|
|
/// 持续时间
|
|
/// </summary>
|
|
public float MaxExistTime { get; private set; }
|
|
/// <summary>
|
|
/// 触发周期
|
|
/// </summary>
|
|
public float TiggerUnitTime { get; private set; }
|
|
/// <summary>
|
|
/// buff辅助数值,属性字段
|
|
/// </summary>
|
|
public System.Collections.Generic.List<BuffCfg.EPropType> PorpParams { get; private set; }
|
|
/// <summary>
|
|
/// buff辅助数值float
|
|
/// </summary>
|
|
public System.Collections.Generic.List<float> FloatParams { get; private set; }
|
|
|
|
public const int __ID__ = -228533862;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void Resolve(Dictionary<string, object> _tables)
|
|
{
|
|
PostResolve();
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> 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();
|
|
}
|
|
}
|