AlicizaX/Client/Assets/Scripts/Hotfix/GameProto/Config/Generate/Tables/Achievement.cs

122 lines
4.1 KiB
C#
Raw Normal View History

2025-01-23 19:06:48 +08:00
//------------------------------------------------------------------------------
// <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 Luban;
using AlicizaX.Config;
namespace Game.Config.Tables
{
public sealed partial class Achievement : Luban.BeanBase
{
public Achievement(int Id, int Image, string Name, string AchievementContent, string LockText, System.Collections.Generic.List<int> AchievementUnlockCondition)
{
this.Id = Id;
this.Image = Image;
this.Name = Name;
this.AchievementContent = AchievementContent;
this.LockText = LockText;
this.AchievementUnlockCondition = AchievementUnlockCondition;
PostInit();
}
public Achievement(ByteBuf _buf)
{
Id = _buf.ReadInt();
Image = _buf.ReadInt();
Name = _buf.ReadString();
AchievementContent = _buf.ReadString();
LockText = _buf.ReadString();
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AchievementUnlockCondition = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); AchievementUnlockCondition.Add(_e0);}}
// Localization Key Begin
Name_Localization_Key = Name;
AchievementContent_Localization_Key = AchievementContent;
LockText_Localization_Key = LockText;
// Localization Key End
PostInit();
}
public static Achievement DeserializeAchievement(ByteBuf _buf)
{
return new Tables.Achievement(_buf);
}
/// <summary>
/// ID
/// </summary>
public int Id { private set; get; }
/// <summary>
/// 成就对应的图标id
/// </summary>
public int Image { private set; get; }
/// <summary>
/// 成就Key
/// </summary>
public string Name { private set; get; }
/// <summary>
/// 成就Key 的多语言Key
/// </summary>
public readonly string Name_Localization_Key;
/// <summary>
/// 成就内容Key
/// </summary>
public string AchievementContent { private set; get; }
/// <summary>
/// 成就内容Key 的多语言Key
/// </summary>
public readonly string AchievementContent_Localization_Key;
/// <summary>
/// 未解锁文字key
/// </summary>
public string LockText { private set; get; }
/// <summary>
/// 未解锁文字key 的多语言Key
/// </summary>
public readonly string LockText_Localization_Key;
/// <summary>
/// 成就解锁条件
/// </summary>
public System.Collections.Generic.List<int> AchievementUnlockCondition { private set; get; }
public const int __ID__ = -1048610522;
public override int GetTypeId() => __ID__;
public void ResolveRef(TablesComponent tables)
{
PostResolveRef();
}
public void TranslateText(System.Func<string, string, string> translator)
{
Name = translator(Name_Localization_Key, Name);
AchievementContent = translator(AchievementContent_Localization_Key, AchievementContent);
LockText = translator(LockText_Localization_Key, LockText);
}
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "image:" + Image + ","
+ "name:" + Name + ","
+ "achievementContent:" + AchievementContent + ","
+ "LockText:" + LockText + ","
+ "achievementUnlockCondition:" + StringUtil.CollectionToString(AchievementUnlockCondition) + ","
+ "}";
}
partial void PostInit();
partial void PostResolveRef();
}
}