JJBB/Assets/Project/Script/GameTables/Table_ClientNPC.cs

100 lines
2.5 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_ClientNPC{
public const string TAB_FILE_DATA = "ClientNPC";
private const int _varCount = 18;
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_ClientNPC()
{
}
public Tab_ClientNPC(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
RoleBaseID = int.Parse(segments[2]);
Name = segments[3].Trim();
NameColor = segments[4].Trim();
IsShowName = int.Parse(segments[5]);
MoveSpeed = float.Parse(segments[6]);
FaceDir = float.Parse(segments[7]);
StartPosX = float.Parse(segments[8]);
StartPosZ = float.Parse(segments[9]);
WalkToPosX = float.Parse(segments[10]);
WakeToPosZ = float.Parse(segments[11]);
ActionID = int.Parse(segments[12]);
ActionTime = float.Parse(segments[13]);
DialogText = segments[14].Trim();
DialogTime = float.Parse(segments[15]);
DialogSoundID = int.Parse(segments[16]);
IsFellowOwer = int.Parse(segments[17]);
StatList = segments[18].Trim();
}
public int Id { get; private set; }
public int RoleBaseID { get; private set; }
public string Name { get; private set; }
public string NameColor { get; private set; }
public int IsShowName { get; private set; }
public float MoveSpeed { get; private set; }
public float FaceDir { get; private set; }
public float StartPosX { get; private set; }
public float StartPosZ { get; private set; }
public float WalkToPosX { get; private set; }
public float WakeToPosZ { get; private set; }
public int ActionID { get; private set; }
public float ActionTime { get; private set; }
public string DialogText { get; private set; }
public float DialogTime { get; private set; }
public int DialogSoundID { get; private set; }
public int IsFellowOwer { get; private set; }
public string StatList { get; private set; }
}
}