126 lines
3.4 KiB
C#
126 lines
3.4 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_FashionItem{
|
|
|
|
public const string TAB_FILE_DATA = "FashionItem";
|
|
private const int _varCount = 28;
|
|
|
|
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_FashionItem()
|
|
{
|
|
}
|
|
|
|
public Tab_FashionItem(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
Name = segments[2].Trim();
|
|
ClassId = int.Parse(segments[3]);
|
|
ItemVisualId = int.Parse(segments[4]);
|
|
WeaponId = int.Parse(segments[5]);
|
|
CommonitemId[0] = int.Parse(segments[6]);
|
|
CommonitemId[1] = int.Parse(segments[8]);
|
|
CommonitemId[2] = int.Parse(segments[10]);
|
|
CommonitemId[3] = int.Parse(segments[12]);
|
|
CommonitemId[4] = int.Parse(segments[14]);
|
|
CommonitemId[5] = int.Parse(segments[16]);
|
|
GainTime[0] = int.Parse(segments[7]);
|
|
GainTime[1] = int.Parse(segments[9]);
|
|
GainTime[2] = int.Parse(segments[11]);
|
|
GainTime[3] = int.Parse(segments[13]);
|
|
GainTime[4] = int.Parse(segments[15]);
|
|
GainTime[5] = int.Parse(segments[17]);
|
|
ShowItemId = int.Parse(segments[18]);
|
|
ShowWeaponId = int.Parse(segments[19]);
|
|
CombatPower = int.Parse(segments[20]);
|
|
AttrId[0] = int.Parse(segments[21]);
|
|
AttrId[1] = int.Parse(segments[23]);
|
|
AttrId[2] = int.Parse(segments[25]);
|
|
AttrId[3] = int.Parse(segments[27]);
|
|
AttrValue[0] = int.Parse(segments[22]);
|
|
AttrValue[1] = int.Parse(segments[24]);
|
|
AttrValue[2] = int.Parse(segments[26]);
|
|
AttrValue[3] = int.Parse(segments[28]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public string Name { get; private set; }
|
|
|
|
public int ClassId { get; private set; }
|
|
|
|
public int ItemVisualId { get; private set; }
|
|
|
|
public int WeaponId { get; private set; }
|
|
|
|
public readonly int[] CommonitemId = new int[6];
|
|
public int getCommonitemIdCount() { return CommonitemId.Length; }
|
|
public int GetCommonitemIdbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < CommonitemId.Length)
|
|
return CommonitemId[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] GainTime = new int[6];
|
|
public int getGainTimeCount() { return GainTime.Length; }
|
|
public int GetGainTimebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < GainTime.Length)
|
|
return GainTime[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public int ShowItemId { get; private set; }
|
|
|
|
public int ShowWeaponId { get; private set; }
|
|
|
|
public int CombatPower { get; private set; }
|
|
|
|
public readonly int[] AttrId = new int[4];
|
|
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[4];
|
|
public int getAttrValueCount() { return AttrValue.Length; }
|
|
public int GetAttrValuebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AttrValue.Length)
|
|
return AttrValue[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |