//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_FellowSkill{ public const string TAB_FILE_DATA = "FellowSkill"; private const int _varCount = 13; 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_FellowSkill() { } public Tab_FellowSkill(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); SkillIcon = segments[2].Trim(); Type = int.Parse(segments[3]); IsShow = int.Parse(segments[4]); Level = int.Parse(segments[5]); BaseSkillId = int.Parse(segments[6]); NextSkillId = int.Parse(segments[7]); LevelupConsumeType[0] = int.Parse(segments[8]); LevelupConsumeType[1] = int.Parse(segments[11]); LevelupConsumeSubType[0] = int.Parse(segments[9]); LevelupConsumeSubType[1] = int.Parse(segments[12]); LevelupConsumeNum[0] = int.Parse(segments[10]); LevelupConsumeNum[1] = int.Parse(segments[13]); } public int Id { get; private set; } public string SkillIcon { get; private set; } public int Type { get; private set; } public int IsShow { get; private set; } public int Level { get; private set; } public int BaseSkillId { get; private set; } public int NextSkillId { get; private set; } public readonly int[] LevelupConsumeType = new int[2]; public int getLevelupConsumeTypeCount() { return LevelupConsumeType.Length; } public int GetLevelupConsumeTypebyIndex(int idx) { if(idx >= 0 && idx < LevelupConsumeType.Length) return LevelupConsumeType[idx]; return default(int); } public readonly int[] LevelupConsumeSubType = new int[2]; public int getLevelupConsumeSubTypeCount() { return LevelupConsumeSubType.Length; } public int GetLevelupConsumeSubTypebyIndex(int idx) { if(idx >= 0 && idx < LevelupConsumeSubType.Length) return LevelupConsumeSubType[idx]; return default(int); } public readonly int[] LevelupConsumeNum = new int[2]; public int getLevelupConsumeNumCount() { return LevelupConsumeNum.Length; } public int GetLevelupConsumeNumbyIndex(int idx) { if(idx >= 0 && idx < LevelupConsumeNum.Length) return LevelupConsumeNum[idx]; return default(int); } } }