85 lines
2.0 KiB
C#
85 lines
2.0 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_SkillActive{
|
|
|
|
public const string TAB_FILE_DATA = "SkillActive";
|
|
private const int _varCount = 8;
|
|
|
|
public int GetId()
|
|
{
|
|
return Index;
|
|
}
|
|
|
|
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_SkillActive()
|
|
{
|
|
}
|
|
|
|
public Tab_SkillActive(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Index = int.Parse(segments[0]);
|
|
Profession = int.Parse(segments[2]);
|
|
AwardType[0] = int.Parse(segments[3]);
|
|
AwardType[1] = int.Parse(segments[6]);
|
|
AwardId[0] = int.Parse(segments[4]);
|
|
AwardId[1] = int.Parse(segments[7]);
|
|
AwardVal[0] = int.Parse(segments[5]);
|
|
AwardVal[1] = int.Parse(segments[8]);
|
|
|
|
}
|
|
|
|
public int Index { get; private set; }
|
|
|
|
public int Profession { get; private set; }
|
|
|
|
public readonly int[] AwardType = new int[2];
|
|
public int getAwardTypeCount() { return AwardType.Length; }
|
|
public int GetAwardTypebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardType.Length)
|
|
return AwardType[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardId = new int[2];
|
|
public int getAwardIdCount() { return AwardId.Length; }
|
|
public int GetAwardIdbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardId.Length)
|
|
return AwardId[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardVal = new int[2];
|
|
public int getAwardValCount() { return AwardVal.Length; }
|
|
public int GetAwardValbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardVal.Length)
|
|
return AwardVal[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |