//This code create by CodeEngine ,don't modify using System; using System.Collections.Generic; using System.Collections; using Module.Log; namespace GCGame.Table { public class Tab_ChildrenInitialCombatAttr{ public const string TAB_FILE_DATA = "ChildrenInitialCombatAttr"; private const int _varCount = 40; public int GetId() { return Id; } public static bool Validate(string line) { var segments = 0; foreach (char c in line) if (c == '\t') segments++; // Note: skip the 2nd column as it's the description; var result = segments == _varCount; if (!result) LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments)); return result; } public Tab_ChildrenInitialCombatAttr() { } public Tab_ChildrenInitialCombatAttr(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); Gender = int.Parse(segments[2]); Level = int.Parse(segments[3]); CombatValue = int.Parse(segments[4]); PropType[0] = int.Parse(segments[5]); PropType[1] = int.Parse(segments[8]); PropType[2] = int.Parse(segments[11]); PropType[3] = int.Parse(segments[14]); PropType[4] = int.Parse(segments[17]); PropType[5] = int.Parse(segments[20]); PropType[6] = int.Parse(segments[23]); PropType[7] = int.Parse(segments[26]); PropType[8] = int.Parse(segments[29]); PropType[9] = int.Parse(segments[32]); PropType[10] = int.Parse(segments[35]); PropType[11] = int.Parse(segments[38]); PropSubType[0] = int.Parse(segments[6]); PropSubType[1] = int.Parse(segments[9]); PropSubType[2] = int.Parse(segments[12]); PropSubType[3] = int.Parse(segments[15]); PropSubType[4] = int.Parse(segments[18]); PropSubType[5] = int.Parse(segments[21]); PropSubType[6] = int.Parse(segments[24]); PropSubType[7] = int.Parse(segments[27]); PropSubType[8] = int.Parse(segments[30]); PropSubType[9] = int.Parse(segments[33]); PropSubType[10] = int.Parse(segments[36]); PropSubType[11] = int.Parse(segments[39]); PropVal[0] = int.Parse(segments[7]); PropVal[1] = int.Parse(segments[10]); PropVal[2] = int.Parse(segments[13]); PropVal[3] = int.Parse(segments[16]); PropVal[4] = int.Parse(segments[19]); PropVal[5] = int.Parse(segments[22]); PropVal[6] = int.Parse(segments[25]); PropVal[7] = int.Parse(segments[28]); PropVal[8] = int.Parse(segments[31]); PropVal[9] = int.Parse(segments[34]); PropVal[10] = int.Parse(segments[37]); PropVal[11] = int.Parse(segments[40]); } public int Id { get; private set; } public int Gender { get; private set; } public int Level { get; private set; } public int CombatValue { get; private set; } public readonly int[] PropType = new int[12]; public int getPropTypeCount() { return PropType.Length; } public int GetPropTypebyIndex(int idx) { if(idx >= 0 && idx < PropType.Length) return PropType[idx]; return default(int); } public readonly int[] PropSubType = new int[12]; public int getPropSubTypeCount() { return PropSubType.Length; } public int GetPropSubTypebyIndex(int idx) { if(idx >= 0 && idx < PropSubType.Length) return PropSubType[idx]; return default(int); } public readonly int[] PropVal = new int[12]; public int getPropValCount() { return PropVal.Length; } public int GetPropValbyIndex(int idx) { if(idx >= 0 && idx < PropVal.Length) return PropVal[idx]; return default(int); } } }