Files
JJBB/Assets/Project/Script/GameTables/Table_PrivateBoss.cs

81 lines
1.9 KiB
C#
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
//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_PrivateBoss{
public const string TAB_FILE_DATA = "PrivateBoss";
private const int _varCount = 10;
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_PrivateBoss()
{
}
public Tab_PrivateBoss(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
FubenID = int.Parse(segments[2]);
Icon = segments[3].Trim();
Level = int.Parse(segments[4]);
RewardShow[0] = segments[5].Trim();
RewardShow[1] = segments[6].Trim();
ActivityValue = int.Parse(segments[7]);
CousumeType = int.Parse(segments[8]);
ConsumeSubType = int.Parse(segments[9]);
ConsumeVal = int.Parse(segments[10]);
}
public int Id { get; private set; }
public int FubenID { get; private set; }
public string Icon { get; private set; }
public int Level { get; private set; }
public readonly string[] RewardShow = new string[2];
public int getRewardShowCount() { return RewardShow.Length; }
public string GetRewardShowbyIndex(int idx)
{
if(idx >= 0 && idx < RewardShow.Length)
return RewardShow[idx];
return default(string);
}
public int ActivityValue { get; private set; }
public int CousumeType { get; private set; }
public int ConsumeSubType { get; private set; }
public int ConsumeVal { get; private set; }
}
}