89 lines
2.2 KiB
C#
89 lines
2.2 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_Relive{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "Relive";
|
||
|
private const int _varCount = 13;
|
||
|
|
||
|
public int GetId()
|
||
|
{
|
||
|
return ReliveID;
|
||
|
}
|
||
|
|
||
|
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_Relive()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_Relive(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
ReliveID = int.Parse(segments[0]);
|
||
|
IsNeedShowBtn = int.Parse(segments[2]);
|
||
|
ReliveBtnName = segments[3].Trim();
|
||
|
ReliveParam[0] = int.Parse(segments[4]);
|
||
|
ReliveParam[1] = int.Parse(segments[5]);
|
||
|
ReliveParam[2] = int.Parse(segments[6]);
|
||
|
ReliveParam[3] = int.Parse(segments[7]);
|
||
|
ConsumeId = int.Parse(segments[8]);
|
||
|
RetTime = int.Parse(segments[9]);
|
||
|
ImpactId[0] = int.Parse(segments[10]);
|
||
|
ImpactId[1] = int.Parse(segments[11]);
|
||
|
ImpactId[2] = int.Parse(segments[12]);
|
||
|
LimitTime = int.Parse(segments[13]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int ReliveID { get; private set; }
|
||
|
|
||
|
public int IsNeedShowBtn { get; private set; }
|
||
|
|
||
|
public string ReliveBtnName { get; private set; }
|
||
|
|
||
|
public readonly int[] ReliveParam = new int[4];
|
||
|
public int getReliveParamCount() { return ReliveParam.Length; }
|
||
|
public int GetReliveParambyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ReliveParam.Length)
|
||
|
return ReliveParam[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int ConsumeId { get; private set; }
|
||
|
|
||
|
public int RetTime { get; private set; }
|
||
|
|
||
|
public readonly int[] ImpactId = new int[3];
|
||
|
public int getImpactIdCount() { return ImpactId.Length; }
|
||
|
public int GetImpactIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ImpactId.Length)
|
||
|
return ImpactId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int LimitTime { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|