Files
JJBB/Assets/Project/Script/GameTables/Table_FellowLearnSkillCost.cs
2024-08-23 15:49:34 +08:00

88 lines
2.2 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_FellowLearnSkillCost{
public const string TAB_FILE_DATA = "FellowLearnSkillCost";
private const int _varCount = 9;
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_FellowLearnSkillCost()
{
}
public Tab_FellowLearnSkillCost(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
SkillName = segments[2].Trim();
SkillDesc = segments[3].Trim();
ConsumeType[0] = int.Parse(segments[4]);
ConsumeType[1] = int.Parse(segments[7]);
ConsumeSubType[0] = int.Parse(segments[5]);
ConsumeSubType[1] = int.Parse(segments[8]);
ConsumeNum[0] = int.Parse(segments[6]);
ConsumeNum[1] = int.Parse(segments[9]);
}
public int Id { get; private set; }
public string SkillName { get; private set; }
public string SkillDesc { 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);
}
}
}