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

92 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_SoulGeneralStar{
public const string TAB_FILE_DATA = "SoulGeneralStar";
private const int _varCount = 12;
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_SoulGeneralStar()
{
}
public Tab_SoulGeneralStar(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
Star = int.Parse(segments[2]);
OpenLevel = int.Parse(segments[3]);
ConsumeType = int.Parse(segments[4]);
ConsumeSubType = int.Parse(segments[5]);
ConsumeValue = int.Parse(segments[6]);
SucceedRate = int.Parse(segments[7]);
AttrId[0] = int.Parse(segments[8]);
AttrId[1] = int.Parse(segments[10]);
AttrValue[0] = int.Parse(segments[9]);
AttrValue[1] = int.Parse(segments[11]);
AttrPower = int.Parse(segments[12]);
}
public int Id { get; private set; }
public int Star { get; private set; }
public int OpenLevel { get; private set; }
public int ConsumeType { get; private set; }
public int ConsumeSubType { get; private set; }
public int ConsumeValue { get; private set; }
public int SucceedRate { get; private set; }
public readonly int[] AttrId = new int[2];
public int getAttrIdCount() { return AttrId.Length; }
public int GetAttrIdbyIndex(int idx)
{
if(idx >= 0 && idx < AttrId.Length)
return AttrId[idx];
return default(int);
}
public readonly int[] AttrValue = new int[2];
public int getAttrValueCount() { return AttrValue.Length; }
public int GetAttrValuebyIndex(int idx)
{
if(idx >= 0 && idx < AttrValue.Length)
return AttrValue[idx];
return default(int);
}
public int AttrPower { get; private set; }
}
}