107 lines
2.8 KiB
C#
107 lines
2.8 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_Effect{
|
|
|
|
public const string TAB_FILE_DATA = "Effect";
|
|
private const int _varCount = 20;
|
|
|
|
public int GetId()
|
|
{
|
|
return EffectID;
|
|
}
|
|
|
|
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_Effect()
|
|
{
|
|
}
|
|
|
|
public Tab_Effect(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
EffectID = int.Parse(segments[0]);
|
|
Profession = int.Parse(segments[2]);
|
|
Path = segments[3].Trim();
|
|
DelayTime = float.Parse(segments[4]);
|
|
IsOnlyDeactive = int.Parse(segments[5]) > 0;
|
|
Type = byte.Parse(segments[6]);
|
|
ParentName = segments[7].Trim();
|
|
OffsetX = float.Parse(segments[8]);
|
|
OffsetY = float.Parse(segments[9]);
|
|
OffsetZ = float.Parse(segments[10]);
|
|
Yaw = float.Parse(segments[11]);
|
|
Scale = float.Parse(segments[12]);
|
|
IsFellowOwner = int.Parse(segments[13]) > 0;
|
|
RotationType = int.Parse(segments[14]);
|
|
CountLimit = int.Parse(segments[15]);
|
|
Duration = float.Parse(segments[16]);
|
|
ParamValue[0] = int.Parse(segments[17]);
|
|
ParamValue[1] = int.Parse(segments[18]);
|
|
ParamValue[2] = int.Parse(segments[19]);
|
|
ParamValue[3] = int.Parse(segments[20]);
|
|
|
|
}
|
|
|
|
public int EffectID { get; private set; }
|
|
|
|
public int Profession { get; private set; }
|
|
|
|
public string Path { get; private set; }
|
|
|
|
public float DelayTime { get; private set; }
|
|
|
|
public bool IsOnlyDeactive { get; private set; }
|
|
|
|
public byte Type { get; private set; }
|
|
|
|
public string ParentName { get; private set; }
|
|
|
|
public float OffsetX { get; private set; }
|
|
|
|
public float OffsetY { get; private set; }
|
|
|
|
public float OffsetZ { get; private set; }
|
|
|
|
public float Yaw { get; private set; }
|
|
|
|
public float Scale { get; private set; }
|
|
|
|
public bool IsFellowOwner { get; private set; }
|
|
|
|
public int RotationType { get; private set; }
|
|
|
|
public int CountLimit { get; private set; }
|
|
|
|
public float Duration { get; private set; }
|
|
|
|
public readonly int[] ParamValue = new int[4];
|
|
public int getParamValueCount() { return ParamValue.Length; }
|
|
public int GetParamValuebyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < ParamValue.Length)
|
|
return ParamValue[idx];
|
|
return default(int);
|
|
}
|
|
|
|
|
|
}
|
|
} |