public void ParseEntry(String[] raw) { Comment = CsvParser.String(raw[0]); Id = CsvParser.Int32(raw[1]); BattleStatus result = 0; for (Int32 index = 2; index < raw.Length; index++) { String value = raw[index]; if (String.IsNullOrEmpty(value)) { continue; } Int32 number = (Int32)CsvParser.EnumValue <BattleStatusNumber>(value); if (number == 0) { continue; } result |= (BattleStatus)(1 << checked (number - 1)); } Value = result; }
public void ParseEntry(String[] raw) { Comment = CsvParser.String(raw[0]); Id = CsvParser.Int32(raw[1]); TargetDisplay menuWindow = CsvParser.EnumValue <TargetDisplay>(raw[2]); TargetType targets = CsvParser.EnumValue <TargetType>(raw[3]); Boolean defaultAlly = CsvParser.Boolean(raw[4]); Boolean forDead = CsvParser.Boolean(raw[5]); Boolean defaultOnDead = CsvParser.Boolean(raw[6]); Boolean defaultCamera = CsvParser.Boolean(raw[7]); Int16 animation1 = CsvParser.Int16(raw[8]); UInt16 animation2 = CsvParser.UInt16(raw[9]); Byte scriptId = CsvParser.Byte(raw[10]); Byte power = CsvParser.Byte(raw[11]); Byte elements = CsvParser.Byte(raw[12]); Byte rate = CsvParser.ByteOrMinusOne(raw[13]); Byte category = CsvParser.Byte(raw[14]); Byte statusIndex = CsvParser.Byte(raw[15]); Byte mp = CsvParser.Byte(raw[16]); Byte type = CsvParser.Byte(raw[17]); BattleCommandInfo cmd = new BattleCommandInfo(targets, defaultAlly, menuWindow, animation1, forDead, defaultCamera, defaultOnDead); BTL_REF btl = new BTL_REF(scriptId, power, elements, rate); ActionData = new AA_DATA(cmd, btl, category, statusIndex, mp, type, animation2); }