//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_WeedingConfig{ public const string TAB_FILE_DATA = "WeedingConfig"; private const int _varCount = 23; 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_WeedingConfig() { } public Tab_WeedingConfig(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); MarryType = int.Parse(segments[2]); WeedingName = segments[3].Trim(); NeedLevel = int.Parse(segments[4]); ConsumeType = int.Parse(segments[5]); ConsumeSubType = int.Parse(segments[6]); ConsumeValue = int.Parse(segments[7]); GainTileId[0] = int.Parse(segments[8]); GainTileId[1] = int.Parse(segments[9]); GainFashionId = int.Parse(segments[10]); GainFashionItemId = int.Parse(segments[11]); BundlePathId = int.Parse(segments[12]); TitleName[0] = segments[13].Trim(); TitleName[1] = segments[14].Trim(); DivorceTitle = segments[15].Trim(); DivorceDesc = segments[16].Trim(); FeastType = int.Parse(segments[17]); CarType = int.Parse(segments[18]); RewId[0] = int.Parse(segments[19]); RewId[1] = int.Parse(segments[20]); WCTypeIcon = segments[21].Trim(); WCName = segments[22].Trim(); BanquetName = segments[23].Trim(); } public int Id { get; private set; } public int MarryType { get; private set; } public string WeedingName { get; private set; } public int NeedLevel { get; private set; } public int ConsumeType { get; private set; } public int ConsumeSubType { get; private set; } public int ConsumeValue { get; private set; } public readonly int[] GainTileId = new int[2]; public int getGainTileIdCount() { return GainTileId.Length; } public int GetGainTileIdbyIndex(int idx) { if(idx >= 0 && idx < GainTileId.Length) return GainTileId[idx]; return default(int); } public int GainFashionId { get; private set; } public int GainFashionItemId { get; private set; } public int BundlePathId { get; private set; } public readonly string[] TitleName = new string[2]; public int getTitleNameCount() { return TitleName.Length; } public string GetTitleNamebyIndex(int idx) { if(idx >= 0 && idx < TitleName.Length) return TitleName[idx]; return default(string); } public string DivorceTitle { get; private set; } public string DivorceDesc { get; private set; } public int FeastType { get; private set; } public int CarType { get; private set; } public readonly int[] RewId = new int[2]; public int getRewIdCount() { return RewId.Length; } public int GetRewIdbyIndex(int idx) { if(idx >= 0 && idx < RewId.Length) return RewId[idx]; return default(int); } public string WCTypeIcon { get; private set; } public string WCName { get; private set; } public string BanquetName { get; private set; } } }