Files
back_cantanBuilding/Assets/Scripts/Tables/FishingEvent.cs
2026-05-26 16:15:54 +08:00

126 lines
4.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//------------------------------------------------------------------------------
// <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
{
public sealed partial class FishingEvent : Bright.Config.BeanBase
{
public JSONNode json;
public FishingEvent(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
{ if(!_json["SubType"].IsNumber) { throw new SerializationException(); } SubType = _json["SubType"]; }
{ if(!_json["RedirectID"].IsNumber) { throw new SerializationException(); } RedirectID = _json["RedirectID"]; }
{ if(!_json["IsABTest"].IsBoolean) { throw new SerializationException(); } IsABTest = _json["IsABTest"]; }
{ if(!_json["TimeDefinition"].IsObject) { throw new SerializationException(); } TimeDefinition = FishingEventType.DeserializeFishingEventType(_json["TimeDefinition"]); }
{ if(!_json["ConditionRelation"].IsNumber) { throw new SerializationException(); } ConditionRelation = _json["ConditionRelation"]; }
{ var __json0 = _json["ConditionList"]; if(!__json0.IsArray) { throw new SerializationException(); } ConditionList = new System.Collections.Generic.List<EventCondition>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { EventCondition __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = EventCondition.DeserializeEventCondition(__e0); } ConditionList.Add(__v0); } }
{ if(!_json["FaceID"].IsNumber) { throw new SerializationException(); } FaceID = _json["FaceID"]; }
json = _json;
PostInit();
}
public FishingEvent(int ID, int Type, int SubType, int RedirectID, bool IsABTest, FishingEventType TimeDefinition, int ConditionRelation, System.Collections.Generic.List<EventCondition> ConditionList, int FaceID )
{
this.ID = ID;
this.Type = Type;
this.SubType = SubType;
this.RedirectID = RedirectID;
this.IsABTest = IsABTest;
this.TimeDefinition = TimeDefinition;
this.ConditionRelation = ConditionRelation;
this.ConditionList = ConditionList;
this.FaceID = FaceID;
PostInit();
}
public static FishingEvent DeserializeFishingEvent(JSONNode _json)
{
return new FishingEvent(_json);
}
/// <summary>
/// #备注行
/// </summary>
public int ID { get; private set; }
/// <summary>
/// 见附录
/// </summary>
public int Type { get; private set; }
/// <summary>
/// 见附录
/// </summary>
public int SubType { get; private set; }
/// <summary>
/// 对应表格的编号
/// </summary>
public int RedirectID { get; private set; }
/// <summary>
/// 0否<br/>1是<br/>是AB Test的不会读取生效
/// </summary>
public bool IsABTest { get; private set; }
/// <summary>
/// Forever永久活动<br/>LimitedTime限时活动<br/>UserRegistration用户注册时间<br/>Daily日活动<br/>Weekly周活动
/// </summary>
public FishingEventType TimeDefinition { get; private set; }
/// <summary>
/// ConditionList填多个时生效<br/>0或<br/>1
/// </summary>
public int ConditionRelation { get; private set; }
/// <summary>
/// 见enum表
/// </summary>
public System.Collections.Generic.List<EventCondition> ConditionList { get; private set; }
/// <summary>
/// 对应拍脸表编号
/// </summary>
public int FaceID { get; private set; }
public const int __ID__ = 792394320;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
TimeDefinition?.Resolve(_tables);
foreach(var _e in ConditionList) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
TimeDefinition?.TranslateText(translator);
foreach(var _e in ConditionList) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Type:" + Type + ","
+ "SubType:" + SubType + ","
+ "RedirectID:" + RedirectID + ","
+ "IsABTest:" + IsABTest + ","
+ "TimeDefinition:" + TimeDefinition + ","
+ "ConditionRelation:" + ConditionRelation + ","
+ "ConditionList:" + Bright.Common.StringUtil.CollectionToString(ConditionList) + ","
+ "FaceID:" + FaceID + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}