//------------------------------------------------------------------------------ // // 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 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 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(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); } /// /// ID /// public int Id { private set; get; } /// /// 成就对应的图标id /// public int Image { private set; get; } /// /// 成就Key /// public string Name { private set; get; } /// /// 成就Key 的多语言Key /// public readonly string Name_Localization_Key; /// /// 成就内容Key /// public string AchievementContent { private set; get; } /// /// 成就内容Key 的多语言Key /// public readonly string AchievementContent_Localization_Key; /// /// 未解锁文字key /// public string LockText { private set; get; } /// /// 未解锁文字key 的多语言Key /// public readonly string LockText_Localization_Key; /// /// 成就解锁条件 /// public System.Collections.Generic.List 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 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(); } }