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

115 lines
3.3 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_PromoteCultivation{
public const string TAB_FILE_DATA = "PromoteCultivation";
private const int _varCount = 34;
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_PromoteCultivation()
{
}
public Tab_PromoteCultivation(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
CostItemId = int.Parse(segments[2]);
CostNum = int.Parse(segments[3]);
AddPropType[0] = int.Parse(segments[4]);
AddPropType[1] = int.Parse(segments[7]);
AddPropType[2] = int.Parse(segments[10]);
AddPropType[3] = int.Parse(segments[13]);
AddPropType[4] = int.Parse(segments[16]);
AddPropType[5] = int.Parse(segments[19]);
AddPropType[6] = int.Parse(segments[22]);
AddPropType[7] = int.Parse(segments[25]);
AddPropType[8] = int.Parse(segments[28]);
AddPropType[9] = int.Parse(segments[31]);
AddPropSubType[0] = int.Parse(segments[5]);
AddPropSubType[1] = int.Parse(segments[8]);
AddPropSubType[2] = int.Parse(segments[11]);
AddPropSubType[3] = int.Parse(segments[14]);
AddPropSubType[4] = int.Parse(segments[17]);
AddPropSubType[5] = int.Parse(segments[20]);
AddPropSubType[6] = int.Parse(segments[23]);
AddPropSubType[7] = int.Parse(segments[26]);
AddPropSubType[8] = int.Parse(segments[29]);
AddPropSubType[9] = int.Parse(segments[32]);
AddPropVal[0] = int.Parse(segments[6]);
AddPropVal[1] = int.Parse(segments[9]);
AddPropVal[2] = int.Parse(segments[12]);
AddPropVal[3] = int.Parse(segments[15]);
AddPropVal[4] = int.Parse(segments[18]);
AddPropVal[5] = int.Parse(segments[21]);
AddPropVal[6] = int.Parse(segments[24]);
AddPropVal[7] = int.Parse(segments[27]);
AddPropVal[8] = int.Parse(segments[30]);
AddPropVal[9] = int.Parse(segments[33]);
AddAptitudePer = int.Parse(segments[34]);
}
public int Id { get; private set; }
public int CostItemId { get; private set; }
public int CostNum { get; private set; }
public readonly int[] AddPropType = new int[10];
public int getAddPropTypeCount() { return AddPropType.Length; }
public int GetAddPropTypebyIndex(int idx)
{
if(idx >= 0 && idx < AddPropType.Length)
return AddPropType[idx];
return default(int);
}
public readonly int[] AddPropSubType = new int[10];
public int getAddPropSubTypeCount() { return AddPropSubType.Length; }
public int GetAddPropSubTypebyIndex(int idx)
{
if(idx >= 0 && idx < AddPropSubType.Length)
return AddPropSubType[idx];
return default(int);
}
public readonly int[] AddPropVal = new int[10];
public int getAddPropValCount() { return AddPropVal.Length; }
public int GetAddPropValbyIndex(int idx)
{
if(idx >= 0 && idx < AddPropVal.Length)
return AddPropVal[idx];
return default(int);
}
public int AddAptitudePer { get; private set; }
}
}