97 lines
2.4 KiB
C#
97 lines
2.4 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_CrossSerFlagAward{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "CrossSerFlagAward";
|
||
|
private const int _varCount = 16;
|
||
|
|
||
|
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_CrossSerFlagAward()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_CrossSerFlagAward(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
Type = int.Parse(segments[2]);
|
||
|
LimitMin = int.Parse(segments[3]);
|
||
|
LimitMax = int.Parse(segments[4]);
|
||
|
ItemID[0] = int.Parse(segments[5]);
|
||
|
ItemID[1] = int.Parse(segments[8]);
|
||
|
ItemID[2] = int.Parse(segments[11]);
|
||
|
ItemID[3] = int.Parse(segments[14]);
|
||
|
ItemNum[0] = int.Parse(segments[6]);
|
||
|
ItemNum[1] = int.Parse(segments[9]);
|
||
|
ItemNum[2] = int.Parse(segments[12]);
|
||
|
ItemNum[3] = int.Parse(segments[15]);
|
||
|
ItemBind[0] = int.Parse(segments[7]);
|
||
|
ItemBind[1] = int.Parse(segments[10]);
|
||
|
ItemBind[2] = int.Parse(segments[13]);
|
||
|
ItemBind[3] = int.Parse(segments[16]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int Type { get; private set; }
|
||
|
|
||
|
public int LimitMin { get; private set; }
|
||
|
|
||
|
public int LimitMax { get; private set; }
|
||
|
|
||
|
public readonly int[] ItemID = new int[4];
|
||
|
public int getItemIDCount() { return ItemID.Length; }
|
||
|
public int GetItemIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ItemID.Length)
|
||
|
return ItemID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ItemNum = new int[4];
|
||
|
public int getItemNumCount() { return ItemNum.Length; }
|
||
|
public int GetItemNumbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ItemNum.Length)
|
||
|
return ItemNum[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] ItemBind = new int[4];
|
||
|
public int getItemBindCount() { return ItemBind.Length; }
|
||
|
public int GetItemBindbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ItemBind.Length)
|
||
|
return ItemBind[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|