128 lines
3.5 KiB
C#
128 lines
3.5 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_GuildFreightPool{
|
|
|
|
public const string TAB_FILE_DATA = "GuildFreightPool";
|
|
private const int _varCount = 29;
|
|
|
|
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_GuildFreightPool()
|
|
{
|
|
}
|
|
|
|
public Tab_GuildFreightPool(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
ItemName = segments[2].Trim();
|
|
ItemId = int.Parse(segments[3]);
|
|
ItemNum = int.Parse(segments[4]);
|
|
LevelSec[0] = int.Parse(segments[5]);
|
|
LevelSec[1] = int.Parse(segments[10]);
|
|
LevelSec[2] = int.Parse(segments[15]);
|
|
LevelSec[3] = int.Parse(segments[20]);
|
|
LevelSec[4] = int.Parse(segments[25]);
|
|
Exp[0] = int.Parse(segments[6]);
|
|
Exp[1] = int.Parse(segments[11]);
|
|
Exp[2] = int.Parse(segments[16]);
|
|
Exp[3] = int.Parse(segments[21]);
|
|
Exp[4] = int.Parse(segments[26]);
|
|
YinLiang[0] = int.Parse(segments[7]);
|
|
YinLiang[1] = int.Parse(segments[12]);
|
|
YinLiang[2] = int.Parse(segments[17]);
|
|
YinLiang[3] = int.Parse(segments[22]);
|
|
YinLiang[4] = int.Parse(segments[27]);
|
|
Contribute[0] = int.Parse(segments[8]);
|
|
Contribute[1] = int.Parse(segments[13]);
|
|
Contribute[2] = int.Parse(segments[18]);
|
|
Contribute[3] = int.Parse(segments[23]);
|
|
Contribute[4] = int.Parse(segments[28]);
|
|
HelperContribute[0] = int.Parse(segments[9]);
|
|
HelperContribute[1] = int.Parse(segments[14]);
|
|
HelperContribute[2] = int.Parse(segments[19]);
|
|
HelperContribute[3] = int.Parse(segments[24]);
|
|
HelperContribute[4] = int.Parse(segments[29]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public string ItemName { get; private set; }
|
|
|
|
public int ItemId { get; private set; }
|
|
|
|
public int ItemNum { get; private set; }
|
|
|
|
public readonly int[] LevelSec = new int[5];
|
|
public int getLevelSecCount() { return LevelSec.Length; }
|
|
public int GetLevelSecbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < LevelSec.Length)
|
|
return LevelSec[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] Exp = new int[5];
|
|
public int getExpCount() { return Exp.Length; }
|
|
public int GetExpbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < Exp.Length)
|
|
return Exp[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] YinLiang = new int[5];
|
|
public int getYinLiangCount() { return YinLiang.Length; }
|
|
public int GetYinLiangbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < YinLiang.Length)
|
|
return YinLiang[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] Contribute = new int[5];
|
|
public int getContributeCount() { return Contribute.Length; }
|
|
public int GetContributebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < Contribute.Length)
|
|
return Contribute[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] HelperContribute = new int[5];
|
|
public int getHelperContributeCount() { return HelperContribute.Length; }
|
|
public int GetHelperContributebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < HelperContribute.Length)
|
|
return HelperContribute[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |