103 lines
2.7 KiB
C#
103 lines
2.7 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_TeamLeaderAwardWeek{
|
|
|
|
public const string TAB_FILE_DATA = "TeamLeaderAwardWeek";
|
|
private const int _varCount = 20;
|
|
|
|
public int GetId()
|
|
{
|
|
return Index;
|
|
}
|
|
|
|
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_TeamLeaderAwardWeek()
|
|
{
|
|
}
|
|
|
|
public Tab_TeamLeaderAwardWeek(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Index = int.Parse(segments[0]);
|
|
WeekNeedExp = int.Parse(segments[2]);
|
|
IconBGPath = segments[3].Trim();
|
|
IconMarkBGPath = segments[4].Trim();
|
|
IconGetedBGPath = segments[5].Trim();
|
|
AwardId[0] = int.Parse(segments[6]);
|
|
AwardId[1] = int.Parse(segments[9]);
|
|
AwardId[2] = int.Parse(segments[12]);
|
|
AwardId[3] = int.Parse(segments[15]);
|
|
AwardId[4] = int.Parse(segments[18]);
|
|
AwardSubId[0] = int.Parse(segments[7]);
|
|
AwardSubId[1] = int.Parse(segments[10]);
|
|
AwardSubId[2] = int.Parse(segments[13]);
|
|
AwardSubId[3] = int.Parse(segments[16]);
|
|
AwardSubId[4] = int.Parse(segments[19]);
|
|
AwardCount[0] = int.Parse(segments[8]);
|
|
AwardCount[1] = int.Parse(segments[11]);
|
|
AwardCount[2] = int.Parse(segments[14]);
|
|
AwardCount[3] = int.Parse(segments[17]);
|
|
AwardCount[4] = int.Parse(segments[20]);
|
|
|
|
}
|
|
|
|
public int Index { get; private set; }
|
|
|
|
public int WeekNeedExp { get; private set; }
|
|
|
|
public string IconBGPath { get; private set; }
|
|
|
|
public string IconMarkBGPath { get; private set; }
|
|
|
|
public string IconGetedBGPath { get; private set; }
|
|
|
|
public readonly int[] AwardId = new int[5];
|
|
public int getAwardIdCount() { return AwardId.Length; }
|
|
public int GetAwardIdbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardId.Length)
|
|
return AwardId[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardSubId = new int[5];
|
|
public int getAwardSubIdCount() { return AwardSubId.Length; }
|
|
public int GetAwardSubIdbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardSubId.Length)
|
|
return AwardSubId[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly int[] AwardCount = new int[5];
|
|
public int getAwardCountCount() { return AwardCount.Length; }
|
|
public int GetAwardCountbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardCount.Length)
|
|
return AwardCount[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |