//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_BossHandBook{ public const string TAB_FILE_DATA = "BossHandBook"; private const int _varCount = 23; 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_BossHandBook() { } public Tab_BossHandBook(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); BossId = int.Parse(segments[2]); Level = int.Parse(segments[3]); Icon = segments[4].Trim(); Name = segments[5].Trim(); CostExp = int.Parse(segments[6]); CostExpTotal = int.Parse(segments[7]); CostType = int.Parse(segments[8]); CostSubType = int.Parse(segments[9]); CostCount = int.Parse(segments[10]); PropId[0] = int.Parse(segments[11]); PropId[1] = int.Parse(segments[13]); PropId[2] = int.Parse(segments[15]); PropId[3] = int.Parse(segments[17]); PropId[4] = int.Parse(segments[19]); PropId[5] = int.Parse(segments[21]); PropVal[0] = int.Parse(segments[12]); PropVal[1] = int.Parse(segments[14]); PropVal[2] = int.Parse(segments[16]); PropVal[3] = int.Parse(segments[18]); PropVal[4] = int.Parse(segments[20]); PropVal[5] = int.Parse(segments[22]); Power = int.Parse(segments[23]); } public int Id { get; private set; } public int BossId { get; private set; } public int Level { get; private set; } public string Icon { get; private set; } public string Name { get; private set; } public int CostExp { get; private set; } public int CostExpTotal { get; private set; } public int CostType { get; private set; } public int CostSubType { get; private set; } public int CostCount { get; private set; } public readonly int[] PropId = new int[6]; public int getPropIdCount() { return PropId.Length; } public int GetPropIdbyIndex(int idx) { if(idx >= 0 && idx < PropId.Length) return PropId[idx]; return default(int); } public readonly int[] PropVal = new int[6]; public int getPropValCount() { return PropVal.Length; } public int GetPropValbyIndex(int idx) { if(idx >= 0 && idx < PropVal.Length) return PropVal[idx]; return default(int); } public int Power { get; private set; } } }