//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_ItemCombine{ public const string TAB_FILE_DATA = "ItemCombine"; private const int _varCount = 14; public int GetId() { return ItemID; } 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_ItemCombine() { } public Tab_ItemCombine(string line) { var segments = line.Split('\t'); ItemID = int.Parse(segments[0]); Class = segments[2].Trim(); Profession = int.Parse(segments[3]); SrcItemID[0] = int.Parse(segments[4]); SrcItemID[1] = int.Parse(segments[6]); SrcItemID[2] = int.Parse(segments[8]); SrcItemID[3] = int.Parse(segments[10]); SrcItemID[4] = int.Parse(segments[12]); NeedNum[0] = int.Parse(segments[5]); NeedNum[1] = int.Parse(segments[7]); NeedNum[2] = int.Parse(segments[9]); NeedNum[3] = int.Parse(segments[11]); NeedNum[4] = int.Parse(segments[13]); ShowTips = int.Parse(segments[14]); } public int ItemID { get; private set; } public string Class { get; private set; } public int Profession { get; private set; } public readonly int[] SrcItemID = new int[5]; public int getSrcItemIDCount() { return SrcItemID.Length; } public int GetSrcItemIDbyIndex(int idx) { if(idx >= 0 && idx < SrcItemID.Length) return SrcItemID[idx]; return default(int); } public readonly int[] NeedNum = new int[5]; public int getNeedNumCount() { return NeedNum.Length; } public int GetNeedNumbyIndex(int idx) { if(idx >= 0 && idx < NeedNum.Length) return NeedNum[idx]; return default(int); } public int ShowTips { get; private set; } } }