//------------------------------------------------------------------------------
//
// 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 FishBuff : Bright.Config.BeanBase
{
public JSONNode json;
public FishBuff(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; }
{ if(!_json["GroupId"].IsNumber) { throw new SerializationException(); } GroupId = _json["GroupId"]; }
{ if(!_json["SortID"].IsNumber) { throw new SerializationException(); } SortID = _json["SortID"]; }
{ if(!_json["BuffParam"].IsObject) { throw new SerializationException(); } BuffParam = FishBuffType.DeserializeFishBuffType(_json["BuffParam"]); }
{ if(!_json["IsMapBuff"].IsBoolean) { throw new SerializationException(); } IsMapBuff = _json["IsMapBuff"]; }
{ if(!_json["CountDown"].IsNumber) { throw new SerializationException(); } CountDown = _json["CountDown"]; }
{ if(!_json["Audio"].IsString) { throw new SerializationException(); } Audio = _json["Audio"]; }
{ if(!_json["RemarkNode"].IsString) { throw new SerializationException(); } RemarkNode = _json["RemarkNode"]; }
{ var __json0 = _json["RemarkIcon"]; if(!__json0.IsArray) { throw new SerializationException(); } RemarkIcon = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } RemarkIcon.Add(__v0); } }
{ if(!_json["Title"]["key"].IsString) { throw new SerializationException(); } Title_l10n_key = _json["Title"]["key"]; if(!_json["Title"]["text"].IsString) { throw new SerializationException(); } Title = _json["Title"]["text"]; }
{ if(!_json["Desc"]["key"].IsString) { throw new SerializationException(); } Desc_l10n_key = _json["Desc"]["key"]; if(!_json["Desc"]["text"].IsString) { throw new SerializationException(); } Desc = _json["Desc"]["text"]; }
{ if(!_json["RemarkDesc"]["key"].IsString) { throw new SerializationException(); } RemarkDesc_l10n_key = _json["RemarkDesc"]["key"]; if(!_json["RemarkDesc"]["text"].IsString) { throw new SerializationException(); } RemarkDesc = _json["RemarkDesc"]["text"]; }
{ if(!_json["SceneFx"].IsString) { throw new SerializationException(); } SceneFx = _json["SceneFx"]; }
{ if(!_json["IsDarkness"].IsBoolean) { throw new SerializationException(); } IsDarkness = _json["IsDarkness"]; }
json = _json;
PostInit();
}
public FishBuff(int ID, string Icon, int GroupId, int SortID, FishBuffType BuffParam, bool IsMapBuff, int CountDown, string Audio, string RemarkNode, System.Collections.Generic.List RemarkIcon, string Title, string Desc, string RemarkDesc, string SceneFx, bool IsDarkness )
{
this.ID = ID;
this.Icon = Icon;
this.GroupId = GroupId;
this.SortID = SortID;
this.BuffParam = BuffParam;
this.IsMapBuff = IsMapBuff;
this.CountDown = CountDown;
this.Audio = Audio;
this.RemarkNode = RemarkNode;
this.RemarkIcon = RemarkIcon;
this.Title = Title;
this.Desc = Desc;
this.RemarkDesc = RemarkDesc;
this.SceneFx = SceneFx;
this.IsDarkness = IsDarkness;
PostInit();
}
public static FishBuff DeserializeFishBuff(JSONNode _json)
{
return new FishBuff(_json);
}
public int ID { get; private set; }
public string Icon { get; private set; }
///
/// 同组的Buff可以叠加持续时间
不同组的会分别显示
只有商业化触发的buff,和每日登录触发的buff会叠加
///
public int GroupId { get; private set; }
///
/// 越高则越靠下,也就是越优先展示
同优先级下越早触发的越靠下
如果多个buff出现合并,合并后的buff取合并前SortID最高的
///
public int SortID { get; private set; }
///
/// 参见beans表FishBuffType
///
public FishBuffType BuffParam { get; private set; }
///
/// 如果为1,则只对触发的地图生效,离开地图时会触发提示
///
public bool IsMapBuff { get; private set; }
///
/// 单位秒
-1则为持续到活动结束
///
public int CountDown { get; private set; }
///
/// buff出现时播放
///
public string Audio { get; private set; }
///
/// buff_1:单行
buff_2:图文备注
buff_3:2行
///
public string RemarkNode { get; private set; }
///
/// buff_2:取第1个
buff_3:取前2个
///
public System.Collections.Generic.List RemarkIcon { get; private set; }
///
/// key
///
public string Title { get; private set; }
public string Title_l10n_key { get; }
///
/// key
///
public string Desc { get; private set; }
public string Desc_l10n_key { get; }
///
/// key
///
public string RemarkDesc { get; private set; }
public string RemarkDesc_l10n_key { get; }
///
/// buff持续时间内,场景播放特效
///
public string SceneFx { get; private set; }
///
/// 如果是,则一直压黑,直到buff结束
///
public bool IsDarkness { get; private set; }
public const int __ID__ = -468241685;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
BuffParam?.Resolve(_tables);
PostResolve();
}
public void TranslateText(System.Func translator)
{
BuffParam?.TranslateText(translator);
Title = translator(Title_l10n_key, Title);
Desc = translator(Desc_l10n_key, Desc);
RemarkDesc = translator(RemarkDesc_l10n_key, RemarkDesc);
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Icon:" + Icon + ","
+ "GroupId:" + GroupId + ","
+ "SortID:" + SortID + ","
+ "BuffParam:" + BuffParam + ","
+ "IsMapBuff:" + IsMapBuff + ","
+ "CountDown:" + CountDown + ","
+ "Audio:" + Audio + ","
+ "RemarkNode:" + RemarkNode + ","
+ "RemarkIcon:" + Bright.Common.StringUtil.CollectionToString(RemarkIcon) + ","
+ "Title:" + Title + ","
+ "Desc:" + Desc + ","
+ "RemarkDesc:" + RemarkDesc + ","
+ "SceneFx:" + SceneFx + ","
+ "IsDarkness:" + IsDarkness + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}