先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
140 lines
6.1 KiB
C#
140 lines
6.1 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
|
||
{
|
||
|
||
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"]; }
|
||
{ var __json0 = _json["Channel"]; if(!__json0.IsArray) { throw new SerializationException(); } Channel = new System.Collections.Generic.List<string>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Channel.Add(__v0); } }
|
||
{ 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["PopupPriority"].IsNumber) { throw new SerializationException(); } PopupPriority = _json["PopupPriority"]; }
|
||
{ if(!_json["PopupType"].IsNumber) { throw new SerializationException(); } PopupType = (PopupType)_json["PopupType"].AsInt; }
|
||
json = _json;
|
||
PostInit();
|
||
}
|
||
|
||
public FishingEvent(int ID, int Type, int SubType, int RedirectID, bool IsABTest, System.Collections.Generic.List<string> Channel, FishingEventType TimeDefinition, int ConditionRelation, System.Collections.Generic.List<EventCondition> ConditionList, int PopupPriority, PopupType PopupType )
|
||
{
|
||
this.ID = ID;
|
||
this.Type = Type;
|
||
this.SubType = SubType;
|
||
this.RedirectID = RedirectID;
|
||
this.IsABTest = IsABTest;
|
||
this.Channel = Channel;
|
||
this.TimeDefinition = TimeDefinition;
|
||
this.ConditionRelation = ConditionRelation;
|
||
this.ConditionList = ConditionList;
|
||
this.PopupPriority = PopupPriority;
|
||
this.PopupType = PopupType;
|
||
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>
|
||
/// 0:全部开放<br/>有值:配了哪个开哪个
|
||
/// </summary>
|
||
public System.Collections.Generic.List<string> Channel { 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>
|
||
/// 对应拍脸表编号<br/>越大越靠前
|
||
/// </summary>
|
||
public int PopupPriority { get; private set; }
|
||
/// <summary>
|
||
/// PopupSpecial:特殊拍脸<br/>PopupLogin:每次登录拍脸<br/>PopupDaily:每日刷新时拍脸<br/>PopupEvent:活动期间拍脸1次
|
||
/// </summary>
|
||
public PopupType PopupType { 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 + ","
|
||
+ "Channel:" + Bright.Common.StringUtil.CollectionToString(Channel) + ","
|
||
+ "TimeDefinition:" + TimeDefinition + ","
|
||
+ "ConditionRelation:" + ConditionRelation + ","
|
||
+ "ConditionList:" + Bright.Common.StringUtil.CollectionToString(ConditionList) + ","
|
||
+ "PopupPriority:" + PopupPriority + ","
|
||
+ "PopupType:" + PopupType + ","
|
||
+ "}";
|
||
}
|
||
|
||
partial void PostInit();
|
||
partial void PostResolve();
|
||
}
|
||
}
|