167 lines
5.7 KiB
C#
167 lines
5.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_EquipBaptize{
|
|
|
|
public const string TAB_FILE_DATA = "EquipBaptize";
|
|
private const int _varCount = 70;
|
|
|
|
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_EquipBaptize()
|
|
{
|
|
}
|
|
|
|
public Tab_EquipBaptize(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
BasicPropWeight[0] = int.Parse(segments[2]);
|
|
BasicPropWeight[1] = int.Parse(segments[4]);
|
|
BasicPropWeight[2] = int.Parse(segments[6]);
|
|
BasicPropWeight[3] = int.Parse(segments[8]);
|
|
BasicPropWeight[4] = int.Parse(segments[10]);
|
|
BasicPropWeight[5] = int.Parse(segments[12]);
|
|
BasicPropWeight[6] = int.Parse(segments[14]);
|
|
BasicPropWeight[7] = int.Parse(segments[16]);
|
|
BasicPropWeight[8] = int.Parse(segments[18]);
|
|
BasicPropWeight[9] = int.Parse(segments[20]);
|
|
BasicPropWeight[10] = int.Parse(segments[22]);
|
|
BasicPropWeight[11] = int.Parse(segments[24]);
|
|
BasicPropWeight[12] = int.Parse(segments[26]);
|
|
BasicPropWeight[13] = int.Parse(segments[28]);
|
|
BasicPropWeight[14] = int.Parse(segments[30]);
|
|
BasicPropWeight[15] = int.Parse(segments[32]);
|
|
BasicPropWeight[16] = int.Parse(segments[34]);
|
|
BasicPropWeight[17] = int.Parse(segments[36]);
|
|
BasicPropWeight[18] = int.Parse(segments[38]);
|
|
BasicPropWeight[19] = int.Parse(segments[40]);
|
|
BasicPropRate[0] = float.Parse(segments[3]);
|
|
BasicPropRate[1] = float.Parse(segments[5]);
|
|
BasicPropRate[2] = float.Parse(segments[7]);
|
|
BasicPropRate[3] = float.Parse(segments[9]);
|
|
BasicPropRate[4] = float.Parse(segments[11]);
|
|
BasicPropRate[5] = float.Parse(segments[13]);
|
|
BasicPropRate[6] = float.Parse(segments[15]);
|
|
BasicPropRate[7] = float.Parse(segments[17]);
|
|
BasicPropRate[8] = float.Parse(segments[19]);
|
|
BasicPropRate[9] = float.Parse(segments[21]);
|
|
BasicPropRate[10] = float.Parse(segments[23]);
|
|
BasicPropRate[11] = float.Parse(segments[25]);
|
|
BasicPropRate[12] = float.Parse(segments[27]);
|
|
BasicPropRate[13] = float.Parse(segments[29]);
|
|
BasicPropRate[14] = float.Parse(segments[31]);
|
|
BasicPropRate[15] = float.Parse(segments[33]);
|
|
BasicPropRate[16] = float.Parse(segments[35]);
|
|
BasicPropRate[17] = float.Parse(segments[37]);
|
|
BasicPropRate[18] = float.Parse(segments[39]);
|
|
BasicPropRate[19] = float.Parse(segments[41]);
|
|
PropBarFixedNumber = int.Parse(segments[42]);
|
|
PropBarRandWeight[0] = int.Parse(segments[43]);
|
|
PropBarRandWeight[1] = int.Parse(segments[44]);
|
|
PropBarRandWeight[2] = int.Parse(segments[45]);
|
|
PropBarRandWeight[3] = int.Parse(segments[46]);
|
|
PropBarRandWeight[4] = int.Parse(segments[47]);
|
|
PropBarRandWeight[5] = int.Parse(segments[48]);
|
|
PropBarRandWeight[6] = int.Parse(segments[49]);
|
|
PropBarRandWeight[7] = int.Parse(segments[50]);
|
|
PropBarRandWeight[8] = int.Parse(segments[51]);
|
|
PropBarRandWeight[9] = int.Parse(segments[52]);
|
|
PropBarRandWeight[10] = int.Parse(segments[53]);
|
|
PropExtAddRate[0] = float.Parse(segments[54]);
|
|
PropExtAddRate[1] = float.Parse(segments[55]);
|
|
PropExtAddRate[2] = float.Parse(segments[56]);
|
|
PropExtAddRate[3] = float.Parse(segments[57]);
|
|
PropExtAddRate[4] = float.Parse(segments[58]);
|
|
PropExtAddRate[5] = float.Parse(segments[59]);
|
|
PropExtAddRate[6] = float.Parse(segments[60]);
|
|
PropExtAddRate[7] = float.Parse(segments[61]);
|
|
PropExtAddRate[8] = float.Parse(segments[62]);
|
|
PropExtAddRate[9] = float.Parse(segments[63]);
|
|
EquipHoleRandRate[0] = float.Parse(segments[64]);
|
|
EquipHoleRandRate[1] = float.Parse(segments[65]);
|
|
EquipHoleRandRate[2] = float.Parse(segments[66]);
|
|
EquipHoleRandRate[3] = float.Parse(segments[67]);
|
|
EquipHoleRandRate[4] = float.Parse(segments[68]);
|
|
EquipHoleRandRate[5] = float.Parse(segments[69]);
|
|
PropBarCnt = int.Parse(segments[70]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public readonly int[] BasicPropWeight = new int[20];
|
|
public int getBasicPropWeightCount() { return BasicPropWeight.Length; }
|
|
public int GetBasicPropWeightbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < BasicPropWeight.Length)
|
|
return BasicPropWeight[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly float[] BasicPropRate = new float[20];
|
|
public int getBasicPropRateCount() { return BasicPropRate.Length; }
|
|
public float GetBasicPropRatebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < BasicPropRate.Length)
|
|
return BasicPropRate[idx];
|
|
return default(float);
|
|
}
|
|
|
|
public int PropBarFixedNumber { get; private set; }
|
|
|
|
public readonly int[] PropBarRandWeight = new int[11];
|
|
public int getPropBarRandWeightCount() { return PropBarRandWeight.Length; }
|
|
public int GetPropBarRandWeightbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < PropBarRandWeight.Length)
|
|
return PropBarRandWeight[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly float[] PropExtAddRate = new float[10];
|
|
public int getPropExtAddRateCount() { return PropExtAddRate.Length; }
|
|
public float GetPropExtAddRatebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < PropExtAddRate.Length)
|
|
return PropExtAddRate[idx];
|
|
return default(float);
|
|
}
|
|
|
|
public readonly float[] EquipHoleRandRate = new float[6];
|
|
public int getEquipHoleRandRateCount() { return EquipHoleRandRate.Length; }
|
|
public float GetEquipHoleRandRatebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < EquipHoleRandRate.Length)
|
|
return EquipHoleRandRate[idx];
|
|
return default(float);
|
|
}
|
|
|
|
public int PropBarCnt { get; private set; }
|
|
|
|
|
|
}
|
|
} |