//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_MissionItemGetPath{ public const string TAB_FILE_DATA = "MissionItemGetPath"; private const int _varCount = 20; 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_MissionItemGetPath() { } public Tab_MissionItemGetPath(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); ItemID = int.Parse(segments[2]); PathType[0] = int.Parse(segments[3]); PathType[1] = int.Parse(segments[6]); PathType[2] = int.Parse(segments[9]); PathType[3] = int.Parse(segments[12]); PathType[4] = int.Parse(segments[15]); PathType[5] = int.Parse(segments[18]); PathParam[0] = segments[4].Trim(); PathParam[1] = segments[7].Trim(); PathParam[2] = segments[10].Trim(); PathParam[3] = segments[13].Trim(); PathParam[4] = segments[16].Trim(); PathParam[5] = segments[19].Trim(); PathStr[0] = segments[5].Trim(); PathStr[1] = segments[8].Trim(); PathStr[2] = segments[11].Trim(); PathStr[3] = segments[14].Trim(); PathStr[4] = segments[17].Trim(); PathStr[5] = segments[20].Trim(); } public int Id { get; private set; } public int ItemID { get; private set; } public readonly int[] PathType = new int[6]; public int getPathTypeCount() { return PathType.Length; } public int GetPathTypebyIndex(int idx) { if(idx >= 0 && idx < PathType.Length) return PathType[idx]; return default(int); } public readonly string[] PathParam = new string[6]; public int getPathParamCount() { return PathParam.Length; } public string GetPathParambyIndex(int idx) { if(idx >= 0 && idx < PathParam.Length) return PathParam[idx]; return default(string); } public readonly string[] PathStr = new string[6]; public int getPathStrCount() { return PathStr.Length; } public string GetPathStrbyIndex(int idx) { if(idx >= 0 && idx < PathStr.Length) return PathStr[idx]; return default(string); } } }