87 lines
2.1 KiB
C#
87 lines
2.1 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_EquipBaptizePropName{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "EquipBaptizePropName";
|
||
|
private const int _varCount = 13;
|
||
|
|
||
|
public int GetId()
|
||
|
{
|
||
|
return PropID;
|
||
|
}
|
||
|
|
||
|
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_EquipBaptizePropName()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_EquipBaptizePropName(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
PropID = int.Parse(segments[0]);
|
||
|
Name = segments[2].Trim();
|
||
|
PropSubID = int.Parse(segments[3]);
|
||
|
Max = int.Parse(segments[4]);
|
||
|
Min = int.Parse(segments[5]);
|
||
|
Color[0] = segments[6].Trim();
|
||
|
Color[1] = segments[7].Trim();
|
||
|
Color[2] = segments[8].Trim();
|
||
|
Color[3] = segments[9].Trim();
|
||
|
ColorInBlack[0] = segments[10].Trim();
|
||
|
ColorInBlack[1] = segments[11].Trim();
|
||
|
ColorInBlack[2] = segments[12].Trim();
|
||
|
ColorInBlack[3] = segments[13].Trim();
|
||
|
|
||
|
}
|
||
|
|
||
|
public int PropID { get; private set; }
|
||
|
|
||
|
public string Name { get; private set; }
|
||
|
|
||
|
public int PropSubID { get; private set; }
|
||
|
|
||
|
public int Max { get; private set; }
|
||
|
|
||
|
public int Min { get; private set; }
|
||
|
|
||
|
public readonly string[] Color = new string[4];
|
||
|
public int getColorCount() { return Color.Length; }
|
||
|
public string GetColorbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < Color.Length)
|
||
|
return Color[idx];
|
||
|
return default(string);
|
||
|
}
|
||
|
|
||
|
public readonly string[] ColorInBlack = new string[4];
|
||
|
public int getColorInBlackCount() { return ColorInBlack.Length; }
|
||
|
public string GetColorInBlackbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ColorInBlack.Length)
|
||
|
return ColorInBlack[idx];
|
||
|
return default(string);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|