102 lines
2.8 KiB
C#
102 lines
2.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_SkillTargetSelector{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "SkillTargetSelector";
|
||
|
private const int _varCount = 14;
|
||
|
|
||
|
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_SkillTargetSelector()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_SkillTargetSelector(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
RangCenter = int.Parse(segments[2]);
|
||
|
RangType = int.Parse(segments[3]);
|
||
|
RangParam[0] = int.Parse(segments[4]);
|
||
|
RangParam[1] = int.Parse(segments[5]);
|
||
|
RangParam[2] = int.Parse(segments[6]);
|
||
|
RangParam[3] = int.Parse(segments[7]);
|
||
|
RangParam[4] = int.Parse(segments[8]);
|
||
|
TargetSelectCond[0] = int.Parse(segments[9]);
|
||
|
TargetSelectCond[1] = int.Parse(segments[12]);
|
||
|
TargetSelectVal[0] = int.Parse(segments[10]);
|
||
|
TargetSelectVal[1] = int.Parse(segments[13]);
|
||
|
TargetSelectParam[0] = int.Parse(segments[11]);
|
||
|
TargetSelectParam[1] = int.Parse(segments[14]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int RangCenter { get; private set; }
|
||
|
|
||
|
public int RangType { get; private set; }
|
||
|
|
||
|
public readonly int[] RangParam = new int[5];
|
||
|
public int getRangParamCount() { return RangParam.Length; }
|
||
|
public int GetRangParambyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < RangParam.Length)
|
||
|
return RangParam[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] TargetSelectCond = new int[2];
|
||
|
public int getTargetSelectCondCount() { return TargetSelectCond.Length; }
|
||
|
public int GetTargetSelectCondbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetSelectCond.Length)
|
||
|
return TargetSelectCond[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] TargetSelectVal = new int[2];
|
||
|
public int getTargetSelectValCount() { return TargetSelectVal.Length; }
|
||
|
public int GetTargetSelectValbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetSelectVal.Length)
|
||
|
return TargetSelectVal[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] TargetSelectParam = new int[2];
|
||
|
public int getTargetSelectParamCount() { return TargetSelectParam.Length; }
|
||
|
public int GetTargetSelectParambyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetSelectParam.Length)
|
||
|
return TargetSelectParam[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|