121 lines
3.2 KiB
C#
121 lines
3.2 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_GemSuit{
|
|
|
|
public const string TAB_FILE_DATA = "GemSuit";
|
|
private const int _varCount = 30;
|
|
|
|
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_GemSuit()
|
|
{
|
|
}
|
|
|
|
public Tab_GemSuit(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
Name = segments[2].Trim();
|
|
SuitID = int.Parse(segments[3]);
|
|
SuitLevel = int.Parse(segments[4]);
|
|
CombatValue = int.Parse(segments[5]);
|
|
RequireGemType = int.Parse(segments[6]);
|
|
RequireGemQuality = int.Parse(segments[7]);
|
|
RequireGemLevel = int.Parse(segments[8]);
|
|
RequireGemNum = int.Parse(segments[9]);
|
|
PropID[0] = int.Parse(segments[10]);
|
|
PropID[1] = int.Parse(segments[13]);
|
|
PropID[2] = int.Parse(segments[16]);
|
|
PropID[3] = int.Parse(segments[19]);
|
|
PropID[4] = int.Parse(segments[22]);
|
|
PropID[5] = int.Parse(segments[25]);
|
|
PropID[6] = int.Parse(segments[28]);
|
|
PropSubID[0] = int.Parse(segments[11]);
|
|
PropSubID[1] = int.Parse(segments[14]);
|
|
PropSubID[2] = int.Parse(segments[17]);
|
|
PropSubID[3] = int.Parse(segments[20]);
|
|
PropSubID[4] = int.Parse(segments[23]);
|
|
PropSubID[5] = int.Parse(segments[26]);
|
|
PropSubID[6] = int.Parse(segments[29]);
|
|
PropValue[0] = int.Parse(segments[12]);
|
|
PropValue[1] = int.Parse(segments[15]);
|
|
PropValue[2] = int.Parse(segments[18]);
|
|
PropValue[3] = int.Parse(segments[21]);
|
|
PropValue[4] = int.Parse(segments[24]);
|
|
PropValue[5] = int.Parse(segments[27]);
|
|
PropValue[6] = int.Parse(segments[30]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public string Name { get; private set; }
|
|
|
|
public int SuitID { get; private set; }
|
|
|
|
public int SuitLevel { get; private set; }
|
|
|
|
public int CombatValue { get; private set; }
|
|
|
|
public int RequireGemType { get; private set; }
|
|
|
|
public int RequireGemQuality { get; private set; }
|
|
|
|
public int RequireGemLevel { get; private set; }
|
|
|
|
public int RequireGemNum { get; private set; }
|
|
|
|
public readonly int[] PropID = new int[7];
|
|
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[7];
|
|
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[7];
|
|
public int getPropValueCount() { return PropValue.Length; }
|
|
public int GetPropValuebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < PropValue.Length)
|
|
return PropValue[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |