//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_EquipAttr{ public const string TAB_FILE_DATA = "EquipAttr"; private const int _varCount = 26; 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_EquipAttr() { } public Tab_EquipAttr(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); ModelId = int.Parse(segments[2]); CombatMax = int.Parse(segments[3]); CombatValue = int.Parse(segments[4]); DurablePropValue = int.Parse(segments[5]); PropID[0] = int.Parse(segments[6]); PropID[1] = int.Parse(segments[10]); PropID[2] = int.Parse(segments[14]); PropID[3] = int.Parse(segments[18]); PropID[4] = int.Parse(segments[22]); PropSubID[0] = int.Parse(segments[7]); PropSubID[1] = int.Parse(segments[11]); PropSubID[2] = int.Parse(segments[15]); PropSubID[3] = int.Parse(segments[19]); PropSubID[4] = int.Parse(segments[23]); PropValue[0] = int.Parse(segments[8]); PropValue[1] = int.Parse(segments[12]); PropValue[2] = int.Parse(segments[16]); PropValue[3] = int.Parse(segments[20]); PropValue[4] = int.Parse(segments[24]); IsEnchanceAdd[0] = int.Parse(segments[9]); IsEnchanceAdd[1] = int.Parse(segments[13]); IsEnchanceAdd[2] = int.Parse(segments[17]); IsEnchanceAdd[3] = int.Parse(segments[21]); IsEnchanceAdd[4] = int.Parse(segments[25]); BattleRate = int.Parse(segments[26]); } public int Id { get; private set; } public int ModelId { get; private set; } public int CombatMax { get; private set; } public int CombatValue { get; private set; } public int DurablePropValue { get; private set; } public readonly int[] PropID = new int[5]; 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[5]; 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[] PropValue = new int[5]; public int getPropValueCount() { return PropValue.Length; } public int GetPropValuebyIndex(int idx) { if(idx >= 0 && idx < PropValue.Length) return PropValue[idx]; return default(int); } public readonly int[] IsEnchanceAdd = new int[5]; public int getIsEnchanceAddCount() { return IsEnchanceAdd.Length; } public int GetIsEnchanceAddbyIndex(int idx) { if(idx >= 0 && idx < IsEnchanceAdd.Length) return IsEnchanceAdd[idx]; return default(int); } public int BattleRate { get; private set; } } }