103 lines
2.6 KiB
C#
103 lines
2.6 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_ChildrenStudyLevelUp{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "ChildrenStudyLevelUp";
|
||
|
private const int _varCount = 17;
|
||
|
|
||
|
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_ChildrenStudyLevelUp()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_ChildrenStudyLevelUp(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
SkillName = segments[2].Trim();
|
||
|
StudyType = int.Parse(segments[3]);
|
||
|
Level = int.Parse(segments[4]);
|
||
|
ExpNeed = int.Parse(segments[5]);
|
||
|
EffectType = int.Parse(segments[6]);
|
||
|
EffectValue = int.Parse(segments[7]);
|
||
|
DescStrId = int.Parse(segments[8]);
|
||
|
MoneyType = int.Parse(segments[9]);
|
||
|
MoneyVal = int.Parse(segments[10]);
|
||
|
LevelLimit = int.Parse(segments[11]);
|
||
|
ItemId[0] = int.Parse(segments[12]);
|
||
|
ItemId[1] = int.Parse(segments[14]);
|
||
|
ItemId[2] = int.Parse(segments[16]);
|
||
|
ItemVal[0] = int.Parse(segments[13]);
|
||
|
ItemVal[1] = int.Parse(segments[15]);
|
||
|
ItemVal[2] = int.Parse(segments[17]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public string SkillName { get; private set; }
|
||
|
|
||
|
public int StudyType { get; private set; }
|
||
|
|
||
|
public int Level { get; private set; }
|
||
|
|
||
|
public int ExpNeed { get; private set; }
|
||
|
|
||
|
public int EffectType { get; private set; }
|
||
|
|
||
|
public int EffectValue { get; private set; }
|
||
|
|
||
|
public int DescStrId { get; private set; }
|
||
|
|
||
|
public int MoneyType { get; private set; }
|
||
|
|
||
|
public int MoneyVal { get; private set; }
|
||
|
|
||
|
public int LevelLimit { get; private set; }
|
||
|
|
||
|
public readonly int[] ItemId = new int[3];
|
||
|
public int getItemIdCount() { return ItemId.Length; }
|
||
|
public int GetItemIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ItemId.Length)
|
||
|
return ItemId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ItemVal = new int[3];
|
||
|
public int getItemValCount() { return ItemVal.Length; }
|
||
|
public int GetItemValbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ItemVal.Length)
|
||
|
return ItemVal[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|