private void Parse(CSVLoader csvLoader) { reward1IsPoints = new bool[csvLoader.Rows]; reward2IsPoints = new bool[csvLoader.Rows]; reward3IsPoints = new bool[csvLoader.Rows]; reward1Counts = new int[csvLoader.Rows]; reward2Counts = new int[csvLoader.Rows]; reward3Counts = new int[csvLoader.Rows]; for (int i = 0; i < csvLoader.Rows; i++) { csvLoader.ReadValue(0, i, string.Empty, out string Value); csvLoader.ReadValue(1, i, string.Empty, out string Value2); csvLoader.ReadValue(2, i, string.Empty, out string Value3); csvLoader.ReadValue(3, i, string.Empty, out string Value4); csvLoader.ReadValue(4, i, string.Empty, out string Value5); csvLoader.ReadValue(5, i, string.Empty, out string Value6); csvLoader.ReadValue(6, i, string.Empty, out string Value7); Value.Trim(); Value.ToLower(); Value2.Trim(); Value2.ToLower(); Value3.Trim(); Value3.ToLower(); Value4.Trim(); Value4.ToLower(); Value5.Trim(); Value5.ToLower(); Value6.Trim(); Value6.ToLower(); Value7.Trim(); Value7.ToLower(); reward1IsPoints[i] = ((Convert.ToInt32(Value2) == 1) ? true : false); reward2IsPoints[i] = ((Convert.ToInt32(Value3) == 1) ? true : false); reward3IsPoints[i] = ((Convert.ToInt32(Value4) == 1) ? true : false); reward1Counts[i] = Convert.ToInt32(Value5); reward2Counts[i] = Convert.ToInt32(Value6); reward3Counts[i] = Convert.ToInt32(Value7); } }
private void Parse(CSVLoader csvLoader) { for (int i = 0; i < csvLoader.Rows; i++) { csvLoader.ReadValue(0, i, string.Empty, out string Value); csvLoader.ReadValue(1, i, string.Empty, out string Value2); csvLoader.ReadValue(2, i, string.Empty, out string Value3); csvLoader.ReadValue(3, i, string.Empty, out string Value4); Value.Trim(); Value.ToLower(); Value2.Trim(); Value2.ToLower(); Value3.Trim(); Value3.ToLower(); Value4.Trim(); Value4.ToLower(); int evt = Convert.ToInt32(Value); int opt = Convert.ToInt32(Value3); int amount = Convert.ToInt32(Value4); levelupCompens.Add(new LevelUpCompensation(evt, Value2, opt, amount)); } }
private void ParsePimp(CSVLoader csvLoader) { for (int i = 0; i < csvLoader.Rows; i++) { csvLoader.ReadValue(0, i, string.Empty, out string Value); csvLoader.ReadValue(1, i, string.Empty, out string Value2); csvLoader.ReadValue(2, i, string.Empty, out string Value3); csvLoader.ReadValue(3, i, string.Empty, out string Value4); Value.Trim(); Value.ToLower(); Value2.Trim(); Value2.ToLower(); Value3.Trim(); Value3.ToLower(); Value4.Trim(); Value4.ToLower(); int cat = Convert.ToInt32(Value); int prop = Convert.ToInt32(Value2); int num = Convert.ToInt32(Value3); float val = (float)Convert.ToDouble(Value4); updateValue(cat, prop, num - 1, val); } }