public void Load() { CVSReader reader = new CVSReader(); reader.LoadText("Data/Config/Equip_strengthen.txt", 1); int rows = reader.GetRowCount(); for (int r = 0; r < rows; ++r) { string[] row = reader.GetRow(r); EquipStrengthenConfig ac = ConfigProcess(row) as EquipStrengthenConfig; configs.Add(ac.id, ac); } }
public object ConfigProcess(string[] row) { if (row.Length < 5) { return(null); } RowHelper rh = new RowHelper(row); EquipStrengthenConfig rec = new EquipStrengthenConfig(); rec.id = Utility.ToInt(rh.Read()); //装备ID rec.itemId = Utility.ToInt(rh.Read()); //物品ID rec.itemRatio = rh.Read(); //物品系数 rec.gold = rh.Read(); //金币消耗 rec.recovery = Utility.ToFloat(rh.Read()); //回收比例 return(rec); }