//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_RankInfo{ public const string TAB_FILE_DATA = "RankInfo"; private const int _varCount = 14; 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_RankInfo() { } public Tab_RankInfo(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); Type = int.Parse(segments[2]); SubType = int.Parse(segments[3]); IsFolded = int.Parse(segments[4]); SpecialPropID = int.Parse(segments[5]); MeuType = int.Parse(segments[6]); SubSubType = int.Parse(segments[7]); SubSubTypeName = segments[8].Trim(); InfoID[0] = int.Parse(segments[9]); InfoID[1] = int.Parse(segments[10]); InfoID[2] = int.Parse(segments[11]); InfoID[3] = int.Parse(segments[12]); InfoID[4] = int.Parse(segments[13]); FakeImg = segments[14].Trim(); } public int Id { get; private set; } public int Type { get; private set; } public int SubType { get; private set; } public int IsFolded { get; private set; } public int SpecialPropID { get; private set; } public int MeuType { get; private set; } public int SubSubType { get; private set; } public string SubSubTypeName { get; private set; } public readonly int[] InfoID = new int[5]; public int getInfoIDCount() { return InfoID.Length; } public int GetInfoIDbyIndex(int idx) { if(idx >= 0 && idx < InfoID.Length) return InfoID[idx]; return default(int); } public string FakeImg { get; private set; } } }