public object ConfigProcess(string[] row) { if (row.Length < 7) { return(null); } RowHelper rh = new RowHelper(row); AvocationAvocationskillConfig rec = new AvocationAvocationskillConfig(); rec.id = Utility.ToInt(rh.Read()); //id rec.classification = Utility.ToInt(rh.Read()); //分类 rec.type = Utility.ToInt(rh.Read()); //类型 rec.level = Utility.ToInt(rh.Read()); //等级 rec.exp = Utility.ToInt(rh.Read()); //经验值 rec.needMoney = Utility.ToInt(rh.Read()); //消耗金币数量 rec.openCreateList = rh.Read(); //开启制造列表 return(rec); }
public void Load() { CVSReader reader = new CVSReader(); reader.LoadText("Data/Config/Avocation_avocationskill.txt", 1); int rows = reader.GetRowCount(); for (int r = 0; r < rows; ++r) { string[] row = reader.GetRow(r); AvocationAvocationskillConfig ac = ConfigProcess(row) as AvocationAvocationskillConfig; configs.Add(ac.id, ac); } }