JJBB/Assets/Project/Script/GameTables/Table_Impact.cs
2024-08-23 15:49:34 +08:00

112 lines
3.1 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_Impact{
public const string TAB_FILE_DATA = "Impact";
private const int _varCount = 32;
public int GetId()
{
return ImpactID;
}
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_Impact()
{
}
public Tab_Impact(string line)
{
var segments = line.Split('\t');
ImpactID = int.Parse(segments[0]);
Name = segments[2].Trim();
Instruction = segments[3].Trim();
IsForever = int.Parse(segments[4]);
MaxOverlayCount = int.Parse(segments[5]);
IsNeedNoticeClient = int.Parse(segments[6]);
BuffIcon = segments[7].Trim();
LogicID = int.Parse(segments[8]);
BaseParamValue[0] = int.Parse(segments[9]);
BaseParamValue[1] = int.Parse(segments[10]);
BaseParamValue[2] = int.Parse(segments[11]);
BaseParamValue[3] = int.Parse(segments[12]);
ParamValue[0] = int.Parse(segments[13]);
ParamValue[1] = int.Parse(segments[14]);
ParamValue[2] = int.Parse(segments[15]);
ParamValue[3] = int.Parse(segments[16]);
ParamValue[4] = int.Parse(segments[17]);
ParamValue[5] = int.Parse(segments[18]);
ParamValue[6] = int.Parse(segments[19]);
ParamValue[7] = int.Parse(segments[20]);
ParamValue[8] = int.Parse(segments[21]);
ParamValue[9] = int.Parse(segments[22]);
ParamValue[10] = int.Parse(segments[23]);
ParamValue[11] = int.Parse(segments[24]);
ParamValue[12] = int.Parse(segments[25]);
ParamValue[13] = int.Parse(segments[26]);
ParamValue[14] = int.Parse(segments[27]);
ParamValue[15] = int.Parse(segments[28]);
ParamValue[16] = int.Parse(segments[29]);
ParamValue[17] = int.Parse(segments[30]);
ParamValue[18] = int.Parse(segments[31]);
ParamValue[19] = int.Parse(segments[32]);
}
public int ImpactID { get; private set; }
public string Name { get; private set; }
public string Instruction { get; private set; }
public int IsForever { get; private set; }
public int MaxOverlayCount { get; private set; }
public int IsNeedNoticeClient { get; private set; }
public string BuffIcon { get; private set; }
public int LogicID { get; private set; }
public readonly int[] BaseParamValue = new int[4];
public int getBaseParamValueCount() { return BaseParamValue.Length; }
public int GetBaseParamValuebyIndex(int idx)
{
if(idx >= 0 && idx < BaseParamValue.Length)
return BaseParamValue[idx];
return default(int);
}
public readonly int[] ParamValue = new int[20];
public int getParamValueCount() { return ParamValue.Length; }
public int GetParamValuebyIndex(int idx)
{
if(idx >= 0 && idx < ParamValue.Length)
return ParamValue[idx];
return default(int);
}
}
}