103 lines
2.6 KiB
C#
103 lines
2.6 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_InteractionSummary{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "InteractionSummary";
|
||
|
private const int _varCount = 15;
|
||
|
|
||
|
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_InteractionSummary()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_InteractionSummary(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
Title = segments[2].Trim();
|
||
|
ButtenStr[0] = segments[3].Trim();
|
||
|
ButtenStr[1] = segments[4].Trim();
|
||
|
InteractionBtn[0] = segments[5].Trim();
|
||
|
InteractionBtn[1] = segments[6].Trim();
|
||
|
CD = int.Parse(segments[7]);
|
||
|
Reward[0] = int.Parse(segments[8]);
|
||
|
Reward[1] = int.Parse(segments[10]);
|
||
|
Reward[2] = int.Parse(segments[12]);
|
||
|
Reward[3] = int.Parse(segments[14]);
|
||
|
Num[0] = int.Parse(segments[9]);
|
||
|
Num[1] = int.Parse(segments[11]);
|
||
|
Num[2] = int.Parse(segments[13]);
|
||
|
Num[3] = int.Parse(segments[15]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public string Title { get; private set; }
|
||
|
|
||
|
public readonly string[] ButtenStr = new string[2];
|
||
|
public int getButtenStrCount() { return ButtenStr.Length; }
|
||
|
public string GetButtenStrbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ButtenStr.Length)
|
||
|
return ButtenStr[idx];
|
||
|
return default(string);
|
||
|
}
|
||
|
|
||
|
public readonly string[] InteractionBtn = new string[2];
|
||
|
public int getInteractionBtnCount() { return InteractionBtn.Length; }
|
||
|
public string GetInteractionBtnbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < InteractionBtn.Length)
|
||
|
return InteractionBtn[idx];
|
||
|
return default(string);
|
||
|
}
|
||
|
|
||
|
public int CD { get; private set; }
|
||
|
|
||
|
public readonly int[] Reward = new int[4];
|
||
|
public int getRewardCount() { return Reward.Length; }
|
||
|
public int GetRewardbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < Reward.Length)
|
||
|
return Reward[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] Num = new int[4];
|
||
|
public int getNumCount() { return Num.Length; }
|
||
|
public int GetNumbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < Num.Length)
|
||
|
return Num[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|