73 lines
1.8 KiB
C#
73 lines
1.8 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_EffectParam{
|
|
|
|
public const string TAB_FILE_DATA = "EffectParam";
|
|
private const int _varCount = 16;
|
|
|
|
public int GetId()
|
|
{
|
|
return EffectParamID;
|
|
}
|
|
|
|
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_EffectParam()
|
|
{
|
|
}
|
|
|
|
public Tab_EffectParam(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
EffectParamID = int.Parse(segments[0]);
|
|
ParamValue[0] = segments[2].Trim();
|
|
ParamValue[1] = segments[3].Trim();
|
|
ParamValue[2] = segments[4].Trim();
|
|
ParamValue[3] = segments[5].Trim();
|
|
ParamValue[4] = segments[6].Trim();
|
|
ParamValue[5] = segments[7].Trim();
|
|
ParamValue[6] = segments[8].Trim();
|
|
ParamValue[7] = segments[9].Trim();
|
|
ParamValue[8] = segments[10].Trim();
|
|
ParamValue[9] = segments[11].Trim();
|
|
ParamValue[10] = segments[12].Trim();
|
|
ParamValue[11] = segments[13].Trim();
|
|
ParamValue[12] = segments[14].Trim();
|
|
ParamValue[13] = segments[15].Trim();
|
|
ParamValue[14] = segments[16].Trim();
|
|
|
|
}
|
|
|
|
public int EffectParamID { get; private set; }
|
|
|
|
public readonly string[] ParamValue = new string[15];
|
|
public int getParamValueCount() { return ParamValue.Length; }
|
|
public string GetParamValuebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < ParamValue.Length)
|
|
return ParamValue[idx];
|
|
return default(string);
|
|
}
|
|
|
|
|
|
}
|
|
} |