//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_MagicWeaponBaseAttr{ public const string TAB_FILE_DATA = "MagicWeaponBaseAttr"; private const int _varCount = 9; 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_MagicWeaponBaseAttr() { } public Tab_MagicWeaponBaseAttr(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); PropId[0] = int.Parse(segments[2]); PropId[1] = int.Parse(segments[5]); PropSubId[0] = int.Parse(segments[3]); PropSubId[1] = int.Parse(segments[6]); PropVal[0] = int.Parse(segments[4]); PropVal[1] = int.Parse(segments[7]); DressID = int.Parse(segments[8]); CombatValue = int.Parse(segments[9]); } public int Id { get; private set; } 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[] PropSubId = new int[2]; public int getPropSubIdCount() { return PropSubId.Length; } public int GetPropSubIdbyIndex(int idx) { if(idx >= 0 && idx < PropSubId.Length) return PropSubId[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 DressID { get; private set; } public int CombatValue { get; private set; } } }