75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
using System.Text;
|
|
|
|
|
|
using Microsoft.IdentityModel.Tokens;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using MetaAssets;
|
|
|
|
|
|
namespace ServerCommon;
|
|
|
|
public static class QuestScriptMetaTableValidator
|
|
{
|
|
[MetaValidator]
|
|
public static void Validate((uint questId, Dictionary<Int32 , MetaAssets.QuestScriptMetaData> questScript) item, ValidatorErrorCollection errors)
|
|
{
|
|
QuestMetaValidateHandler handler = new(item.questId);
|
|
|
|
//퀘스트 스크립트가 무조건 가지고 있어야 하는 항목
|
|
_ = new QuestValidatorForMustHave(handler, item.questId);
|
|
|
|
// if (item.questId == 100)
|
|
// {
|
|
// Log.getLogger().info($"QuestScriptValidation start questId : {item.questId}");
|
|
// }
|
|
|
|
foreach(var line in item.questScript.Values)
|
|
{
|
|
string event_target = line.EventTarget;
|
|
string event_name = line.Event;
|
|
string event_cond_1 = line.EventCondition1;
|
|
string event_cond_2 = line.EventCondition2;
|
|
string event_cond_3 = line.EventCondition3;
|
|
|
|
if (false == event_target.isNullOrWhiteSpace())
|
|
{
|
|
handler.checkEventTarget(event_target, event_name, event_cond_1, event_cond_2, event_cond_3);
|
|
handler.makeEventTargetValidator(event_target, event_name, event_cond_1, event_cond_2, event_cond_3);
|
|
}
|
|
|
|
string func_target = line.FunctionTarget;
|
|
string func_name = line.Function;
|
|
string func_cond_1 = line.FunctionCondition1;
|
|
string func_cond_2 = line.FunctionCondition2;
|
|
string func_cond_3 = line.FunctionCondition3;
|
|
|
|
if (false == func_target.isNullOrWhiteSpace())
|
|
{
|
|
handler.checkFuncTarget(func_target, func_name, func_cond_1, func_cond_2, func_cond_3);
|
|
handler.makeFuncTargetValidator(func_target, func_name, func_cond_1, func_cond_2, func_cond_3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handler.remainDataCheck(errors);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|