//------------------------------------------------------------------------------ // // 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; namespace SepCore.Definition { public sealed partial class ItemConfig : Luban.BeanBase { public ItemConfig(ByteBuf _buf) { Id = _buf.ReadInt(); Name = _buf.ReadString(); ItemType = (ItemType)_buf.ReadInt(); Rarity = (Rarity)_buf.ReadInt(); StackLimit = _buf.ReadInt(); EquipSlot = (EquipmentSlotType)_buf.ReadInt(); MaxHpBonus = _buf.ReadInt(); MaxMpBonus = _buf.ReadInt(); AtkBonus = _buf.ReadInt(); MatBonus = _buf.ReadInt(); SpeedBonus = _buf.ReadInt(); Icon = _buf.ReadString(); Icon_Ref = null; } public static ItemConfig DeserializeItemConfig(ByteBuf _buf) { return new ItemConfig(_buf); } /// /// 物品ID /// public readonly int Id; /// /// 原型名 /// public readonly string Name; /// /// 物品类型 /// public readonly ItemType ItemType; /// /// 稀有度 /// public readonly Rarity Rarity; /// /// 单格堆叠上限 /// public readonly int StackLimit; /// /// 装备栏类型 /// public readonly EquipmentSlotType EquipSlot; /// /// HP上限修正 /// public readonly int MaxHpBonus; /// /// MP上限修正 /// public readonly int MaxMpBonus; /// /// ATK修正 /// public readonly int AtkBonus; /// /// MAT修正 /// public readonly int MatBonus; /// /// SPD修正 /// public readonly int SpeedBonus; /// /// 图标资源配置 /// public readonly string Icon; public SpriteConfig Icon_Ref; public const int __ID__ = -764023723; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { Icon_Ref = tables.TbSpriteConfig.GetOrDefault(Icon); } public override string ToString() { return "{ " + "id:" + Id + "," + "name:" + Name + "," + "itemType:" + ItemType + "," + "rarity:" + Rarity + "," + "stackLimit:" + StackLimit + "," + "equipSlot:" + EquipSlot + "," + "maxHpBonus:" + MaxHpBonus + "," + "maxMpBonus:" + MaxMpBonus + "," + "atkBonus:" + AtkBonus + "," + "matBonus:" + MatBonus + "," + "speedBonus:" + SpeedBonus + "," + "icon:" + Icon + "," + "}"; } } }