115 lines
3.3 KiB
C#
115 lines
3.3 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_AdvanceOther{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "AdvanceOther";
|
||
|
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_AdvanceOther()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_AdvanceOther(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
SpiritIncPercent = int.Parse(segments[2]);
|
||
|
SpiritItemId = int.Parse(segments[3]);
|
||
|
SpiritItemIcon = segments[4].Trim();
|
||
|
SoulItemIcon = segments[5].Trim();
|
||
|
SoulItemId = int.Parse(segments[6]);
|
||
|
SoulIncAttrId[0] = int.Parse(segments[7]);
|
||
|
SoulIncAttrId[1] = int.Parse(segments[9]);
|
||
|
SoulIncAttrId[2] = int.Parse(segments[11]);
|
||
|
SoulIncAttrId[3] = int.Parse(segments[13]);
|
||
|
SoulIncAttrId[4] = int.Parse(segments[15]);
|
||
|
SoulIncAttrValue[0] = int.Parse(segments[8]);
|
||
|
SoulIncAttrValue[1] = int.Parse(segments[10]);
|
||
|
SoulIncAttrValue[2] = int.Parse(segments[12]);
|
||
|
SoulIncAttrValue[3] = int.Parse(segments[14]);
|
||
|
SoulIncAttrValue[4] = int.Parse(segments[16]);
|
||
|
VipIncPercent[0] = int.Parse(segments[17]);
|
||
|
VipIncPercent[1] = int.Parse(segments[18]);
|
||
|
VipIncPercent[2] = int.Parse(segments[19]);
|
||
|
VipIncPercent[3] = int.Parse(segments[20]);
|
||
|
VipIncPercent[4] = int.Parse(segments[21]);
|
||
|
VipIncPercent[5] = int.Parse(segments[22]);
|
||
|
VipIncPercent[6] = int.Parse(segments[23]);
|
||
|
VipIncPercent[7] = int.Parse(segments[24]);
|
||
|
SoulOpenGrade = int.Parse(segments[25]);
|
||
|
SpiritOpenGrade = int.Parse(segments[26]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int SpiritIncPercent { get; private set; }
|
||
|
|
||
|
public int SpiritItemId { get; private set; }
|
||
|
|
||
|
public string SpiritItemIcon { get; private set; }
|
||
|
|
||
|
public string SoulItemIcon { get; private set; }
|
||
|
|
||
|
public int SoulItemId { get; private set; }
|
||
|
|
||
|
public readonly int[] SoulIncAttrId = new int[5];
|
||
|
public int getSoulIncAttrIdCount() { return SoulIncAttrId.Length; }
|
||
|
public int GetSoulIncAttrIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < SoulIncAttrId.Length)
|
||
|
return SoulIncAttrId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] SoulIncAttrValue = new int[5];
|
||
|
public int getSoulIncAttrValueCount() { return SoulIncAttrValue.Length; }
|
||
|
public int GetSoulIncAttrValuebyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < SoulIncAttrValue.Length)
|
||
|
return SoulIncAttrValue[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] VipIncPercent = new int[8];
|
||
|
public int getVipIncPercentCount() { return VipIncPercent.Length; }
|
||
|
public int GetVipIncPercentbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < VipIncPercent.Length)
|
||
|
return VipIncPercent[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int SoulOpenGrade { get; private set; }
|
||
|
|
||
|
public int SpiritOpenGrade { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|