//------------------------------------------------------------------------------ // // 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 ItemGem : Item, IItem { public const string ASSET_NAME = "item"; /// /// 1:伤害宝石 2.生命 3.防御 4.闪避 5.暴击 6.命中 /// index:1 /// public int type { get; private set; } /// /// 宝石等级 /// index:2 /// public int grade { get; private set; } /// /// /// index:3 /// public int[] attribute { get; private set; } /// /// 升级消耗 /// index:4 /// public int[] cost { get; private set; } /// /// 装备部件 /// index:5 /// public int slot { get; private set; } public void Load(IList list) { id = list.GetInt(0); type = list.GetInt(1); grade = list.GetInt(2); attribute = list.GetIntArray(3); cost = list.GetIntArray(4); slot = list.GetInt(5); } public static bool LoadAll(IDictionary dictionary, List result) { if (result == null) { return false; } var list = dictionary.GetList("Gem"); 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 ItemGem CreateThis() { return new ItemGem(); } } }