//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_EquipBaptizeReplaceTarget{ public const string TAB_FILE_DATA = "EquipBaptizeReplaceTarget"; private const int _varCount = 12; public int GetId() { return EquipPos; } 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_EquipBaptizeReplaceTarget() { } public Tab_EquipBaptizeReplaceTarget(string line) { var segments = line.Split('\t'); EquipPos = int.Parse(segments[0]); Quality = int.Parse(segments[2]); Target[0] = int.Parse(segments[3]); Target[1] = int.Parse(segments[4]); Target[2] = int.Parse(segments[5]); Target[3] = int.Parse(segments[6]); Target[4] = int.Parse(segments[7]); Target[5] = int.Parse(segments[8]); Target[6] = int.Parse(segments[9]); Target[7] = int.Parse(segments[10]); Target[8] = int.Parse(segments[11]); Target[9] = int.Parse(segments[12]); } public int EquipPos { get; private set; } public int Quality { get; private set; } public readonly int[] Target = new int[10]; public int getTargetCount() { return Target.Length; } public int GetTargetbyIndex(int idx) { if(idx >= 0 && idx < Target.Length) return Target[idx]; return default(int); } } }