//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_GuildBuilding{ public const string TAB_FILE_DATA = "GuildBuilding"; private const int _varCount = 6; 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_GuildBuilding() { } public Tab_GuildBuilding(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); Describe = segments[2].Trim(); ConsumeWealth = int.Parse(segments[3]); NeedWealth = int.Parse(segments[4]); NeedTime = int.Parse(segments[5]); NeedGuildLevel = int.Parse(segments[6]); } public int Id { get; private set; } public string Describe { get; private set; } public int ConsumeWealth { get; private set; } public int NeedWealth { get; private set; } public int NeedTime { get; private set; } public int NeedGuildLevel { get; private set; } } }