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

120 lines
3.1 KiB
C#
Raw 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_StroyCopy{
public const string TAB_FILE_DATA = "StroyCopy";
private const int _varCount = 24;
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_StroyCopy()
{
}
public Tab_StroyCopy(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
Name = segments[2].Trim();
EasyFubenId = int.Parse(segments[3]);
HeroFubenId = int.Parse(segments[4]);
Tips = segments[5].Trim();
Level = int.Parse(segments[6]);
BossId = int.Parse(segments[7]);
EasyPower = int.Parse(segments[8]);
HeroPower = int.Parse(segments[9]);
EasyDrop[0] = segments[10].Trim();
EasyDrop[1] = segments[11].Trim();
EasyDrop[2] = segments[12].Trim();
EasyDrop[3] = segments[13].Trim();
HeroDrop[0] = segments[14].Trim();
HeroDrop[1] = segments[15].Trim();
HeroDrop[2] = segments[16].Trim();
HeroDrop[3] = segments[17].Trim();
LimitMissionId = int.Parse(segments[18]);
EnumType = int.Parse(segments[19]);
HeroTeamTargetId = int.Parse(segments[20]);
MinLevel = int.Parse(segments[21]);
MaxLevel = int.Parse(segments[22]);
CanSingle = int.Parse(segments[23]);
CanTeam = int.Parse(segments[24]);
}
public int Id { get; private set; }
public string Name { get; private set; }
public int EasyFubenId { get; private set; }
public int HeroFubenId { get; private set; }
public string Tips { get; private set; }
public int Level { get; private set; }
public int BossId { get; private set; }
public int EasyPower { get; private set; }
public int HeroPower { get; private set; }
public readonly string[] EasyDrop = new string[4];
public int getEasyDropCount() { return EasyDrop.Length; }
public string GetEasyDropbyIndex(int idx)
{
if(idx >= 0 && idx < EasyDrop.Length)
return EasyDrop[idx];
return default(string);
}
public readonly string[] HeroDrop = new string[4];
public int getHeroDropCount() { return HeroDrop.Length; }
public string GetHeroDropbyIndex(int idx)
{
if(idx >= 0 && idx < HeroDrop.Length)
return HeroDrop[idx];
return default(string);
}
public int LimitMissionId { get; private set; }
public int EnumType { get; private set; }
public int HeroTeamTargetId { get; private set; }
public int MinLevel { get; private set; }
public int MaxLevel { get; private set; }
public int CanSingle { get; private set; }
public int CanTeam { get; private set; }
}
}