mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
114 lines
3.8 KiB
C#
114 lines
3.8 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;
|
|
|
|
|
|
namespace GameConfig.item
|
|
{
|
|
public sealed partial class Item : Bright.Config.BeanBase
|
|
{
|
|
public Item(ByteBuf _buf)
|
|
{
|
|
Id = _buf.ReadInt();
|
|
Name = _buf.ReadString();
|
|
Desc = _buf.ReadString();
|
|
Price = _buf.ReadInt();
|
|
UpgradeToItemId = _buf.ReadInt();
|
|
if(_buf.ReadBool()){ ExpireTime = _buf.ReadInt(); } else { ExpireTime = null; }
|
|
BatchUseable = _buf.ReadBool();
|
|
ExchangeStream = item.ItemExchange.DeserializeItemExchange(_buf);
|
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);ExchangeList = new System.Collections.Generic.List<item.ItemExchange>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { item.ItemExchange _e0; _e0 = item.ItemExchange.DeserializeItemExchange(_buf); ExchangeList.Add(_e0);}}
|
|
ExchangeColumn = item.ItemExchange.DeserializeItemExchange(_buf);
|
|
PostInit();
|
|
}
|
|
|
|
public static Item DeserializeItem(ByteBuf _buf)
|
|
{
|
|
return new item.Item(_buf);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 这是id
|
|
/// </summary>
|
|
public int Id { get; private set; }
|
|
/// <summary>
|
|
/// 名字
|
|
/// </summary>
|
|
public string Name { get; private set; }
|
|
/// <summary>
|
|
/// 描述
|
|
/// </summary>
|
|
public string Desc { get; private set; }
|
|
/// <summary>
|
|
/// 价格
|
|
/// </summary>
|
|
public int Price { get; private set; }
|
|
/// <summary>
|
|
/// 引用当前表
|
|
/// </summary>
|
|
public int UpgradeToItemId { get; private set; }
|
|
public item.Item UpgradeToItemId_Ref { get; private set; }
|
|
/// <summary>
|
|
/// 过期时间
|
|
/// </summary>
|
|
public int? ExpireTime { get; private set; }
|
|
/// <summary>
|
|
/// 能否批量使用
|
|
/// </summary>
|
|
public bool BatchUseable { get; private set; }
|
|
/// <summary>
|
|
/// 道具兑换配置
|
|
/// </summary>
|
|
public item.ItemExchange ExchangeStream { get; private set; }
|
|
public System.Collections.Generic.List<item.ItemExchange> ExchangeList { get; private set; }
|
|
/// <summary>
|
|
/// 道具兑换配置
|
|
/// </summary>
|
|
public item.ItemExchange ExchangeColumn { get; private set; }
|
|
|
|
public const int __ID__ = 2107285806;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void Resolve(Dictionary<string, object> _tables)
|
|
{
|
|
this.UpgradeToItemId_Ref = (_tables["item.TbItem"] as item.TbItem).GetOrDefault(UpgradeToItemId);
|
|
ExchangeStream?.Resolve(_tables);
|
|
foreach(var _e in ExchangeList) { _e?.Resolve(_tables); }
|
|
ExchangeColumn?.Resolve(_tables);
|
|
PostResolve();
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> translator)
|
|
{
|
|
ExchangeStream?.TranslateText(translator);
|
|
foreach(var _e in ExchangeList) { _e?.TranslateText(translator); }
|
|
ExchangeColumn?.TranslateText(translator);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "Id:" + Id + ","
|
|
+ "Name:" + Name + ","
|
|
+ "Desc:" + Desc + ","
|
|
+ "Price:" + Price + ","
|
|
+ "UpgradeToItemId:" + UpgradeToItemId + ","
|
|
+ "ExpireTime:" + ExpireTime + ","
|
|
+ "BatchUseable:" + BatchUseable + ","
|
|
+ "ExchangeStream:" + ExchangeStream + ","
|
|
+ "ExchangeList:" + Bright.Common.StringUtil.CollectionToString(ExchangeList) + ","
|
|
+ "ExchangeColumn:" + ExchangeColumn + ","
|
|
+ "}";
|
|
}
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
|
|
} |