//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace G { using System.Collections; using System.Collections.Generic; using F; using F.Item; /// /// Generated from: item.xlsx /// public partial class ItemEquipment : Item, IItem { public const string ASSET_NAME = "item"; /// /// 资源名 资源名_类型_等级_序号 /// index:1 /// public string assets { get; private set; } /// /// 装备类型 0:武器 1:头盔 2:首饰 3:盔甲 4:腰饰 5:鞋子 /// index:2 /// public int type { get; private set; } /// /// 武器类型 1:刀 2:双手武器 3:长兵器 4:弓箭 5:权杖 6:魔法 /// index:3 /// public int subType { get; private set; } /// /// 武器属性 [[属性类型,最大值,最小值,权重],[属性类型,最大值,最小值,权重]..] /// index:4 /// public int[][] basicAttributes { get; private set; } /// /// 基础属性 [[属性类型,最大值,最小值],[属性类型,最大值,最小值]..] /// index:5 /// public int[][] extraAttributes { get; private set; } /// /// 特殊属性 [[属性类型,最大值,最小值,权重],[]...] /// index:6 /// public int[][] specialAttributes { get; private set; } /// /// [id,w,id,w] /// index:7 /// public int[] suit { get; private set; } /// /// 战力 /// index:8 /// public int combatValue { get; private set; } public void Load(IList list) { id = list.GetInt(0); assets = list.GetString(1); type = list.GetInt(2); subType = list.GetInt(3); basicAttributes = list.GetIntArray2(4); extraAttributes = list.GetIntArray2(5); specialAttributes = list.GetIntArray2(6); suit = list.GetIntArray(7); combatValue = list.GetInt(8); } public static bool LoadAll(IDictionary dictionary, List result) { if (result == null) { return false; } var list = dictionary.GetList("Equipment"); if (list == null || list.Count == 0) { return false; } int i = 0; for (int c = list.Count; i < c; i++) { var item = CreateThis(); item.Load((IList)list[i]); result.Add(item); } return true; } private static ItemEquipment CreateThis() { return new ItemEquipment(); } } }