91 lines
2.3 KiB
C#
91 lines
2.3 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_HonorBattlefieldAwardR1ank{
|
|
|
|
public const string TAB_FILE_DATA = "HonorBattlefieldAwardR1ank";
|
|
private const int _varCount = 12;
|
|
|
|
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_HonorBattlefieldAwardR1ank()
|
|
{
|
|
}
|
|
|
|
public Tab_HonorBattlefieldAwardR1ank(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
ConditionDesc = segments[2].Trim();
|
|
ConditionIconPath = segments[3].Trim();
|
|
AwardId[0] = int.Parse(segments[4]);
|
|
AwardId[1] = int.Parse(segments[7]);
|
|
AwardId[2] = int.Parse(segments[10]);
|
|
AwardSubId[0] = int.Parse(segments[5]);
|
|
AwardSubId[1] = int.Parse(segments[8]);
|
|
AwardSubId[2] = int.Parse(segments[11]);
|
|
AwardCount[0] = int.Parse(segments[6]);
|
|
AwardCount[1] = int.Parse(segments[9]);
|
|
AwardCount[2] = int.Parse(segments[12]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public string ConditionDesc { get; private set; }
|
|
|
|
public string ConditionIconPath { get; private set; }
|
|
|
|
public readonly int[] AwardId = new int[3];
|
|
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[3];
|
|
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[3];
|
|
public int getAwardCountCount() { return AwardCount.Length; }
|
|
public int GetAwardCountbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < AwardCount.Length)
|
|
return AwardCount[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |