83 lines
2.2 KiB
C#
83 lines
2.2 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 Luban;
|
|
|
|
|
|
namespace SepCore.Definition
|
|
{
|
|
public sealed partial class PropConfig : Luban.BeanBase
|
|
{
|
|
public PropConfig(ByteBuf _buf)
|
|
{
|
|
Id = _buf.ReadInt();
|
|
Name = _buf.ReadString();
|
|
Rarity = (Rarity)_buf.ReadInt();
|
|
Price = _buf.ReadInt();
|
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
|
Sprite = _buf.ReadString();
|
|
Sprite_Ref = null;
|
|
}
|
|
|
|
public static PropConfig DeserializePropConfig(ByteBuf _buf)
|
|
{
|
|
return new PropConfig(_buf);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 道具id
|
|
/// </summary>
|
|
public readonly int Id;
|
|
/// <summary>
|
|
/// 道具名
|
|
/// </summary>
|
|
public readonly string Name;
|
|
/// <summary>
|
|
/// 道具品质
|
|
/// </summary>
|
|
public readonly Rarity Rarity;
|
|
/// <summary>
|
|
/// 道具价格
|
|
/// </summary>
|
|
public readonly int Price;
|
|
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
|
/// <summary>
|
|
/// 图标
|
|
/// </summary>
|
|
public readonly string Sprite;
|
|
public SpriteConfig Sprite_Ref;
|
|
|
|
public const int __ID__ = 91068581;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void ResolveRef(Tables tables)
|
|
{
|
|
|
|
|
|
|
|
|
|
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "id:" + Id + ","
|
|
+ "name:" + Name + ","
|
|
+ "rarity:" + Rarity + ","
|
|
+ "price:" + Price + ","
|
|
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
|
+ "sprite:" + Sprite + ","
|
|
+ "}";
|
|
}
|
|
}
|
|
|
|
}
|