102 lines
2.7 KiB
C#
102 lines
2.7 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_MarryFetter{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "MarryFetter";
|
||
|
private const int _varCount = 26;
|
||
|
|
||
|
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_MarryFetter()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_MarryFetter(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
ID = int.Parse(segments[0]);
|
||
|
OpenStarCount = int.Parse(segments[2]);
|
||
|
FetterGrade = int.Parse(segments[3]);
|
||
|
NextLevelNeedExp = int.Parse(segments[4]);
|
||
|
CombatValue = int.Parse(segments[5]);
|
||
|
AttrId[0] = int.Parse(segments[6]);
|
||
|
AttrId[1] = int.Parse(segments[8]);
|
||
|
AttrId[2] = int.Parse(segments[10]);
|
||
|
AttrId[3] = int.Parse(segments[12]);
|
||
|
AttrId[4] = int.Parse(segments[14]);
|
||
|
AttrId[5] = int.Parse(segments[16]);
|
||
|
AttrId[6] = int.Parse(segments[18]);
|
||
|
AttrId[7] = int.Parse(segments[20]);
|
||
|
AttrId[8] = int.Parse(segments[22]);
|
||
|
AttrId[9] = int.Parse(segments[24]);
|
||
|
AttrValue[0] = int.Parse(segments[7]);
|
||
|
AttrValue[1] = int.Parse(segments[9]);
|
||
|
AttrValue[2] = int.Parse(segments[11]);
|
||
|
AttrValue[3] = int.Parse(segments[13]);
|
||
|
AttrValue[4] = int.Parse(segments[15]);
|
||
|
AttrValue[5] = int.Parse(segments[17]);
|
||
|
AttrValue[6] = int.Parse(segments[19]);
|
||
|
AttrValue[7] = int.Parse(segments[21]);
|
||
|
AttrValue[8] = int.Parse(segments[23]);
|
||
|
AttrValue[9] = int.Parse(segments[25]);
|
||
|
IncPercent = int.Parse(segments[26]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int ID { get; private set; }
|
||
|
|
||
|
public int OpenStarCount { get; private set; }
|
||
|
|
||
|
public int FetterGrade { get; private set; }
|
||
|
|
||
|
public int NextLevelNeedExp { get; private set; }
|
||
|
|
||
|
public int CombatValue { get; private set; }
|
||
|
|
||
|
public readonly int[] AttrId = new int[10];
|
||
|
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[10];
|
||
|
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 IncPercent { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|