Files
JJBB/Assets/Project/Script/GameTables/Table_GuildCollege.cs
2024-08-23 15:49:34 +08:00

66 lines
1.5 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_GuildCollege{
public const string TAB_FILE_DATA = "GuildCollege";
private const int _varCount = 7;
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_GuildCollege()
{
}
public Tab_GuildCollege(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
ChoseMax = int.Parse(segments[2]);
ChoseType[0] = int.Parse(segments[3]);
ChoseType[1] = int.Parse(segments[4]);
ChoseType[2] = int.Parse(segments[5]);
ChoseType[3] = int.Parse(segments[6]);
ChoseType[4] = int.Parse(segments[7]);
}
public int Id { get; private set; }
public int ChoseMax { get; private set; }
public readonly int[] ChoseType = new int[5];
public int getChoseTypeCount() { return ChoseType.Length; }
public int GetChoseTypebyIndex(int idx)
{
if(idx >= 0 && idx < ChoseType.Length)
return ChoseType[idx];
return default(int);
}
}
}