66 lines
1.4 KiB
C#
66 lines
1.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_MissionBranch{
|
|
|
|
public const string TAB_FILE_DATA = "MissionBranch";
|
|
private const int _varCount = 5;
|
|
|
|
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_MissionBranch()
|
|
{
|
|
}
|
|
|
|
public Tab_MissionBranch(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
ID = int.Parse(segments[0]);
|
|
ParamEx[0] = int.Parse(segments[2]);
|
|
ParamEx[1] = int.Parse(segments[3]);
|
|
UIType = int.Parse(segments[4]);
|
|
ClientParam = segments[5].Trim();
|
|
|
|
}
|
|
|
|
public int ID { get; private set; }
|
|
|
|
public readonly int[] ParamEx = new int[2];
|
|
public int getParamExCount() { return ParamEx.Length; }
|
|
public int GetParamExbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < ParamEx.Length)
|
|
return ParamEx[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public int UIType { get; private set; }
|
|
|
|
public string ClientParam { get; private set; }
|
|
|
|
|
|
}
|
|
} |