104 lines
2.7 KiB
C#
104 lines
2.7 KiB
C#
|
//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_GuildLevelUp{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "GuildLevelUp";
|
||
|
private const int _varCount = 19;
|
||
|
|
||
|
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_GuildLevelUp()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_GuildLevelUp(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]);
|
||
|
BuildMax[0] = int.Parse(segments[6]);
|
||
|
BuildMax[1] = int.Parse(segments[7]);
|
||
|
BuildMax[2] = int.Parse(segments[8]);
|
||
|
NeedBuild[0] = int.Parse(segments[9]);
|
||
|
NeedBuild[1] = int.Parse(segments[10]);
|
||
|
NeedBuild[2] = int.Parse(segments[11]);
|
||
|
NeedTwoBuild = int.Parse(segments[12]);
|
||
|
UpperLimit[0] = int.Parse(segments[13]);
|
||
|
UpperLimit[1] = int.Parse(segments[14]);
|
||
|
UpperLimit[2] = int.Parse(segments[15]);
|
||
|
UpperLimit[3] = int.Parse(segments[16]);
|
||
|
UpperLimit[4] = int.Parse(segments[17]);
|
||
|
UpperLimit[5] = int.Parse(segments[18]);
|
||
|
UpperLimit[6] = int.Parse(segments[19]);
|
||
|
|
||
|
}
|
||
|
|
||
|
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 readonly int[] BuildMax = new int[3];
|
||
|
public int getBuildMaxCount() { return BuildMax.Length; }
|
||
|
public int GetBuildMaxbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < BuildMax.Length)
|
||
|
return BuildMax[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] NeedBuild = new int[3];
|
||
|
public int getNeedBuildCount() { return NeedBuild.Length; }
|
||
|
public int GetNeedBuildbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < NeedBuild.Length)
|
||
|
return NeedBuild[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int NeedTwoBuild { get; private set; }
|
||
|
|
||
|
public readonly int[] UpperLimit = new int[7];
|
||
|
public int getUpperLimitCount() { return UpperLimit.Length; }
|
||
|
public int GetUpperLimitbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < UpperLimit.Length)
|
||
|
return UpperLimit[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|