//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_BloodVeinNode{ public const string TAB_FILE_DATA = "BloodVeinNode"; 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_BloodVeinNode() { } public Tab_BloodVeinNode(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); Icon = segments[2].Trim(); CostType[0] = int.Parse(segments[3]); CostType[1] = int.Parse(segments[6]); CostSub[0] = int.Parse(segments[4]); CostSub[1] = int.Parse(segments[7]); CostVal[0] = int.Parse(segments[5]); CostVal[1] = int.Parse(segments[8]); PropId[0] = int.Parse(segments[9]); PropId[1] = int.Parse(segments[11]); PropVal[0] = int.Parse(segments[10]); PropVal[1] = int.Parse(segments[12]); Power = int.Parse(segments[13]); } public int Id { get; private set; } public string Icon { get; private set; } public readonly int[] CostType = new int[2]; public int getCostTypeCount() { return CostType.Length; } public int GetCostTypebyIndex(int idx) { if(idx >= 0 && idx < CostType.Length) return CostType[idx]; return default(int); } public readonly int[] CostSub = new int[2]; public int getCostSubCount() { return CostSub.Length; } public int GetCostSubbyIndex(int idx) { if(idx >= 0 && idx < CostSub.Length) return CostSub[idx]; return default(int); } public readonly int[] CostVal = new int[2]; public int getCostValCount() { return CostVal.Length; } public int GetCostValbyIndex(int idx) { if(idx >= 0 && idx < CostVal.Length) return CostVal[idx]; return default(int); } public readonly int[] PropId = new int[2]; 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[2]; 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; } } }