81 lines
1.8 KiB
C#
81 lines
1.8 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_RoleIntegralShop{
|
|
|
|
public const string TAB_FILE_DATA = "RoleIntegralShop";
|
|
private const int _varCount = 9;
|
|
|
|
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_RoleIntegralShop()
|
|
{
|
|
}
|
|
|
|
public Tab_RoleIntegralShop(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
IntegralType = int.Parse(segments[2]);
|
|
IntegralDayLimit = int.Parse(segments[3]);
|
|
Item[0] = int.Parse(segments[4]);
|
|
Item[1] = int.Parse(segments[8]);
|
|
Cost[0] = int.Parse(segments[5]);
|
|
Cost[1] = int.Parse(segments[7]);
|
|
Cost[2] = int.Parse(segments[9]);
|
|
Intem2 = int.Parse(segments[6]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public int IntegralType { get; private set; }
|
|
|
|
public int IntegralDayLimit { get; private set; }
|
|
|
|
public readonly int[] Item = new int[2];
|
|
public int getItemCount() { return Item.Length; }
|
|
public int GetItembyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < Item.Length)
|
|
return Item[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] Cost = new int[3];
|
|
public int getCostCount() { return Cost.Length; }
|
|
public int GetCostbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < Cost.Length)
|
|
return Cost[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public int Intem2 { get; private set; }
|
|
|
|
|
|
}
|
|
} |