91 lines
2.3 KiB
C#
91 lines
2.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_WeddingCandy{
|
|
|
|
public const string TAB_FILE_DATA = "WeddingCandy";
|
|
private const int _varCount = 12;
|
|
|
|
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_WeddingCandy()
|
|
{
|
|
}
|
|
|
|
public Tab_WeddingCandy(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
CostSubClassType = int.Parse(segments[2]);
|
|
CostVal = int.Parse(segments[3]);
|
|
AwardType[0] = int.Parse(segments[4]);
|
|
AwardType[1] = int.Parse(segments[7]);
|
|
AwardType[2] = int.Parse(segments[10]);
|
|
AwardSubType[0] = int.Parse(segments[5]);
|
|
AwardSubType[1] = int.Parse(segments[8]);
|
|
AwardSubType[2] = int.Parse(segments[11]);
|
|
AwardNum[0] = int.Parse(segments[6]);
|
|
AwardNum[1] = int.Parse(segments[9]);
|
|
AwardNum[2] = int.Parse(segments[12]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public int CostSubClassType { get; private set; }
|
|
|
|
public int CostVal { get; private set; }
|
|
|
|
public readonly int[] AwardType = new int[3];
|
|
public int getAwardTypeCount() { return AwardType.Length; }
|
|
public int GetAwardTypebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardType.Length)
|
|
return AwardType[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardSubType = new int[3];
|
|
public int getAwardSubTypeCount() { return AwardSubType.Length; }
|
|
public int GetAwardSubTypebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardSubType.Length)
|
|
return AwardSubType[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardNum = new int[3];
|
|
public int getAwardNumCount() { return AwardNum.Length; }
|
|
public int GetAwardNumbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardNum.Length)
|
|
return AwardNum[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |