109 lines
2.8 KiB
C#
109 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_LivingSkills{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "LivingSkills";
|
||
|
private const int _varCount = 16;
|
||
|
|
||
|
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_LivingSkills()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_LivingSkills(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
Tips = segments[2].Trim();
|
||
|
SkillGroupID = int.Parse(segments[3]);
|
||
|
SkillName = segments[4].Trim();
|
||
|
SkillIcon = segments[5].Trim();
|
||
|
SkillLevel = int.Parse(segments[6]);
|
||
|
NextSkill = int.Parse(segments[7]);
|
||
|
ConsumeType[0] = int.Parse(segments[8]);
|
||
|
ConsumeType[1] = int.Parse(segments[11]);
|
||
|
ConsumeSubType[0] = int.Parse(segments[9]);
|
||
|
ConsumeSubType[1] = int.Parse(segments[12]);
|
||
|
ConsumeNum[0] = int.Parse(segments[10]);
|
||
|
ConsumeNum[1] = int.Parse(segments[13]);
|
||
|
PropID = int.Parse(segments[14]);
|
||
|
PropSubID = int.Parse(segments[15]);
|
||
|
PropValue = int.Parse(segments[16]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public string Tips { get; private set; }
|
||
|
|
||
|
public int SkillGroupID { get; private set; }
|
||
|
|
||
|
public string SkillName { get; private set; }
|
||
|
|
||
|
public string SkillIcon { get; private set; }
|
||
|
|
||
|
public int SkillLevel { get; private set; }
|
||
|
|
||
|
public int NextSkill { get; private set; }
|
||
|
|
||
|
public readonly int[] ConsumeType = new int[2];
|
||
|
public int getConsumeTypeCount() { return ConsumeType.Length; }
|
||
|
public int GetConsumeTypebyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumeType.Length)
|
||
|
return ConsumeType[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ConsumeSubType = new int[2];
|
||
|
public int getConsumeSubTypeCount() { return ConsumeSubType.Length; }
|
||
|
public int GetConsumeSubTypebyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumeSubType.Length)
|
||
|
return ConsumeSubType[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ConsumeNum = new int[2];
|
||
|
public int getConsumeNumCount() { return ConsumeNum.Length; }
|
||
|
public int GetConsumeNumbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumeNum.Length)
|
||
|
return ConsumeNum[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int PropID { get; private set; }
|
||
|
|
||
|
public int PropSubID { get; private set; }
|
||
|
|
||
|
public int PropValue { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|