87 lines
2.2 KiB
C#
87 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_CrossSerFlagConfig{
|
|
|
|
public const string TAB_FILE_DATA = "CrossSerFlagConfig";
|
|
private const int _varCount = 13;
|
|
|
|
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_CrossSerFlagConfig()
|
|
{
|
|
}
|
|
|
|
public Tab_CrossSerFlagConfig(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
RunTime = int.Parse(segments[2]);
|
|
LeaveTime = int.Parse(segments[3]);
|
|
BuffID = int.Parse(segments[4]);
|
|
BuffTime = int.Parse(segments[5]);
|
|
SamllPointID[0] = int.Parse(segments[6]);
|
|
SamllPointID[1] = int.Parse(segments[7]);
|
|
SamllPointID[2] = int.Parse(segments[8]);
|
|
SamllPointID[3] = int.Parse(segments[9]);
|
|
BigPointID[0] = int.Parse(segments[10]);
|
|
BigPointID[1] = int.Parse(segments[11]);
|
|
BigPointID[2] = int.Parse(segments[12]);
|
|
BigPointID[3] = int.Parse(segments[13]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public int RunTime { get; private set; }
|
|
|
|
public int LeaveTime { get; private set; }
|
|
|
|
public int BuffID { get; private set; }
|
|
|
|
public int BuffTime { get; private set; }
|
|
|
|
public readonly int[] SamllPointID = new int[4];
|
|
public int getSamllPointIDCount() { return SamllPointID.Length; }
|
|
public int GetSamllPointIDbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < SamllPointID.Length)
|
|
return SamllPointID[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] BigPointID = new int[4];
|
|
public int getBigPointIDCount() { return BigPointID.Length; }
|
|
public int GetBigPointIDbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < BigPointID.Length)
|
|
return BigPointID[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |