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

111 lines
2.9 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_Ornament{
public const string TAB_FILE_DATA = "Ornament";
private const int _varCount = 21;
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_Ornament()
{
}
public Tab_Ornament(string line)
{
var segments = line.Split('\t');
ID = int.Parse(segments[0]);
Type = int.Parse(segments[2]);
TypeName = segments[3].Trim();
ItemID = int.Parse(segments[4]);
ShowIconName = segments[5].Trim();
FootPrintBindPointName = segments[6].Trim();
SelfChatBG = segments[7].Trim();
OtherChatBG = segments[8].Trim();
BundlePathID = int.Parse(segments[9]);
FootPrintName = segments[10].Trim();
ItemGetPathId = int.Parse(segments[11]);
ItemGetDescId = int.Parse(segments[12]);
CombatVal = int.Parse(segments[13]);
PropId[0] = int.Parse(segments[14]);
PropId[1] = int.Parse(segments[16]);
PropId[2] = int.Parse(segments[18]);
PropId[3] = int.Parse(segments[20]);
PropVal[0] = int.Parse(segments[15]);
PropVal[1] = int.Parse(segments[17]);
PropVal[2] = int.Parse(segments[19]);
PropVal[3] = int.Parse(segments[21]);
}
public int ID { get; private set; }
public int Type { get; private set; }
public string TypeName { get; private set; }
public int ItemID { get; private set; }
public string ShowIconName { get; private set; }
public string FootPrintBindPointName { get; private set; }
public string SelfChatBG { get; private set; }
public string OtherChatBG { get; private set; }
public int BundlePathID { get; private set; }
public string FootPrintName { get; private set; }
public int ItemGetPathId { get; private set; }
public int ItemGetDescId { get; private set; }
public int CombatVal { get; private set; }
public readonly int[] PropId = new int[4];
public int getPropIdCount() { return PropId.Length; }
public int GetPropIdbyIndex(int idx)
{
if(idx >= 0 && idx < PropId.Length)
return PropId[idx];
return default(int);
}
public readonly int[] PropVal = new int[4];
public int getPropValCount() { return PropVal.Length; }
public int GetPropValbyIndex(int idx)
{
if(idx >= 0 && idx < PropVal.Length)
return PropVal[idx];
return default(int);
}
}
}