141 lines
3.8 KiB
C#
141 lines
3.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_SkillLevelUp{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "SkillLevelUp";
|
||
|
private const int _varCount = 22;
|
||
|
|
||
|
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_SkillLevelUp()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_SkillLevelUp(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
Level = int.Parse(segments[2]);
|
||
|
SkillLevel = int.Parse(segments[3]);
|
||
|
IsMaxLevel = int.Parse(segments[4]);
|
||
|
NeedSkillId[0] = int.Parse(segments[5]);
|
||
|
NeedSkillId[1] = int.Parse(segments[6]);
|
||
|
NextSkillId = int.Parse(segments[7]);
|
||
|
ConsumType[0] = int.Parse(segments[8]);
|
||
|
ConsumType[1] = int.Parse(segments[11]);
|
||
|
ConsumType[2] = int.Parse(segments[14]);
|
||
|
ConsumId[0] = int.Parse(segments[9]);
|
||
|
ConsumId[1] = int.Parse(segments[12]);
|
||
|
ConsumId[2] = int.Parse(segments[15]);
|
||
|
ConsumVal[0] = int.Parse(segments[10]);
|
||
|
ConsumVal[1] = int.Parse(segments[13]);
|
||
|
ConsumVal[2] = int.Parse(segments[16]);
|
||
|
AwardType[0] = int.Parse(segments[17]);
|
||
|
AwardType[1] = int.Parse(segments[20]);
|
||
|
AwardId[0] = int.Parse(segments[18]);
|
||
|
AwardId[1] = int.Parse(segments[21]);
|
||
|
AwardVal[0] = int.Parse(segments[19]);
|
||
|
AwardVal[1] = int.Parse(segments[22]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int Level { get; private set; }
|
||
|
|
||
|
public int SkillLevel { get; private set; }
|
||
|
|
||
|
public int IsMaxLevel { get; private set; }
|
||
|
|
||
|
public readonly int[] NeedSkillId = new int[2];
|
||
|
public int getNeedSkillIdCount() { return NeedSkillId.Length; }
|
||
|
public int GetNeedSkillIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < NeedSkillId.Length)
|
||
|
return NeedSkillId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int NextSkillId { get; private set; }
|
||
|
|
||
|
public readonly int[] ConsumType = new int[3];
|
||
|
public int getConsumTypeCount() { return ConsumType.Length; }
|
||
|
public int GetConsumTypebyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumType.Length)
|
||
|
return ConsumType[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ConsumId = new int[3];
|
||
|
public int getConsumIdCount() { return ConsumId.Length; }
|
||
|
public int GetConsumIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumId.Length)
|
||
|
return ConsumId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ConsumVal = new int[3];
|
||
|
public int getConsumValCount() { return ConsumVal.Length; }
|
||
|
public int GetConsumValbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ConsumVal.Length)
|
||
|
return ConsumVal[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
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);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|