162 lines
5.0 KiB
C#
162 lines
5.0 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_MissionDictionary{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "MissionDictionary";
|
||
|
private const int _varCount = 37;
|
||
|
|
||
|
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_MissionDictionary()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_MissionDictionary(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
MissionName = segments[2].Trim();
|
||
|
MissionDesc = segments[3].Trim();
|
||
|
MissionAcceptDialogID = int.Parse(segments[4]);
|
||
|
MissionFinishDialogID = int.Parse(segments[5]);
|
||
|
FollowText[0] = segments[6].Trim();
|
||
|
FollowText[1] = segments[7].Trim();
|
||
|
FollowText[2] = segments[8].Trim();
|
||
|
FollowText[3] = segments[9].Trim();
|
||
|
TargetNpcPosX[0] = float.Parse(segments[10]);
|
||
|
TargetNpcPosX[1] = float.Parse(segments[14]);
|
||
|
TargetNpcPosX[2] = float.Parse(segments[18]);
|
||
|
TargetNpcPosX[3] = float.Parse(segments[22]);
|
||
|
TargetNpcPosZ[0] = float.Parse(segments[11]);
|
||
|
TargetNpcPosZ[1] = float.Parse(segments[15]);
|
||
|
TargetNpcPosZ[2] = float.Parse(segments[19]);
|
||
|
TargetNpcPosZ[3] = float.Parse(segments[23]);
|
||
|
TargetNpcSceneID[0] = int.Parse(segments[12]);
|
||
|
TargetNpcSceneID[1] = int.Parse(segments[16]);
|
||
|
TargetNpcSceneID[2] = int.Parse(segments[20]);
|
||
|
TargetNpcSceneID[3] = int.Parse(segments[24]);
|
||
|
TargetNpcDataID[0] = int.Parse(segments[13]);
|
||
|
TargetNpcDataID[1] = int.Parse(segments[17]);
|
||
|
TargetNpcDataID[2] = int.Parse(segments[21]);
|
||
|
TargetNpcDataID[3] = int.Parse(segments[25]);
|
||
|
AccepteNpcPosX = float.Parse(segments[26]);
|
||
|
AccepteNpcPosZ = float.Parse(segments[27]);
|
||
|
AccepteNpcSceneID = int.Parse(segments[28]);
|
||
|
AcceptNpcDataID = int.Parse(segments[29]);
|
||
|
CompleteNpcPosX = float.Parse(segments[30]);
|
||
|
CompleteNpcPosZ = float.Parse(segments[31]);
|
||
|
CompleteNpcSceneID = int.Parse(segments[32]);
|
||
|
CompleteNpcDataID = int.Parse(segments[33]);
|
||
|
IsAcceptAutoFindPath = int.Parse(segments[34]) > 0;
|
||
|
AcceptSoundId = int.Parse(segments[35]);
|
||
|
CompleteSoundID = int.Parse(segments[36]);
|
||
|
IsCanFly = int.Parse(segments[37]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public string MissionName { get; private set; }
|
||
|
|
||
|
public string MissionDesc { get; private set; }
|
||
|
|
||
|
public int MissionAcceptDialogID { get; private set; }
|
||
|
|
||
|
public int MissionFinishDialogID { get; private set; }
|
||
|
|
||
|
public readonly string[] FollowText = new string[4];
|
||
|
public int getFollowTextCount() { return FollowText.Length; }
|
||
|
public string GetFollowTextbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < FollowText.Length)
|
||
|
return FollowText[idx];
|
||
|
return default(string);
|
||
|
}
|
||
|
|
||
|
public readonly float[] TargetNpcPosX = new float[4];
|
||
|
public int getTargetNpcPosXCount() { return TargetNpcPosX.Length; }
|
||
|
public float GetTargetNpcPosXbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetNpcPosX.Length)
|
||
|
return TargetNpcPosX[idx];
|
||
|
return default(float);
|
||
|
}
|
||
|
|
||
|
public readonly float[] TargetNpcPosZ = new float[4];
|
||
|
public int getTargetNpcPosZCount() { return TargetNpcPosZ.Length; }
|
||
|
public float GetTargetNpcPosZbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetNpcPosZ.Length)
|
||
|
return TargetNpcPosZ[idx];
|
||
|
return default(float);
|
||
|
}
|
||
|
|
||
|
public readonly int[] TargetNpcSceneID = new int[4];
|
||
|
public int getTargetNpcSceneIDCount() { return TargetNpcSceneID.Length; }
|
||
|
public int GetTargetNpcSceneIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetNpcSceneID.Length)
|
||
|
return TargetNpcSceneID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] TargetNpcDataID = new int[4];
|
||
|
public int getTargetNpcDataIDCount() { return TargetNpcDataID.Length; }
|
||
|
public int GetTargetNpcDataIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < TargetNpcDataID.Length)
|
||
|
return TargetNpcDataID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public float AccepteNpcPosX { get; private set; }
|
||
|
|
||
|
public float AccepteNpcPosZ { get; private set; }
|
||
|
|
||
|
public int AccepteNpcSceneID { get; private set; }
|
||
|
|
||
|
public int AcceptNpcDataID { get; private set; }
|
||
|
|
||
|
public float CompleteNpcPosX { get; private set; }
|
||
|
|
||
|
public float CompleteNpcPosZ { get; private set; }
|
||
|
|
||
|
public int CompleteNpcSceneID { get; private set; }
|
||
|
|
||
|
public int CompleteNpcDataID { get; private set; }
|
||
|
|
||
|
public bool IsAcceptAutoFindPath { get; private set; }
|
||
|
|
||
|
public int AcceptSoundId { get; private set; }
|
||
|
|
||
|
public int CompleteSoundID { get; private set; }
|
||
|
|
||
|
public int IsCanFly { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|