91 lines
2.2 KiB
C#
91 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_GemAttr{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "GemAttr";
|
||
|
private const int _varCount = 15;
|
||
|
|
||
|
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_GemAttr()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_GemAttr(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
MaxHP = int.Parse(segments[2]);
|
||
|
MaxMP = int.Parse(segments[3]);
|
||
|
PysAttack = int.Parse(segments[4]);
|
||
|
MagAttack = int.Parse(segments[5]);
|
||
|
PysDef = int.Parse(segments[6]);
|
||
|
MagDef = int.Parse(segments[7]);
|
||
|
Hit = int.Parse(segments[8]);
|
||
|
Dodge = int.Parse(segments[9]);
|
||
|
Critical = int.Parse(segments[10]);
|
||
|
Decritical = int.Parse(segments[11]);
|
||
|
Strike = int.Parse(segments[12]);
|
||
|
Ductical = int.Parse(segments[13]);
|
||
|
CritiAdd = int.Parse(segments[14]);
|
||
|
CritiMis = int.Parse(segments[15]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int MaxHP { get; private set; }
|
||
|
|
||
|
public int MaxMP { get; private set; }
|
||
|
|
||
|
public int PysAttack { get; private set; }
|
||
|
|
||
|
public int MagAttack { get; private set; }
|
||
|
|
||
|
public int PysDef { get; private set; }
|
||
|
|
||
|
public int MagDef { get; private set; }
|
||
|
|
||
|
public int Hit { get; private set; }
|
||
|
|
||
|
public int Dodge { get; private set; }
|
||
|
|
||
|
public int Critical { get; private set; }
|
||
|
|
||
|
public int Decritical { get; private set; }
|
||
|
|
||
|
public int Strike { get; private set; }
|
||
|
|
||
|
public int Ductical { get; private set; }
|
||
|
|
||
|
public int CritiAdd { get; private set; }
|
||
|
|
||
|
public int CritiMis { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|