opening quest stuff

This commit is contained in:
yogurt 2017-10-10 13:32:47 -05:00
parent 9fc99faa5c
commit 92de857cda
49 changed files with 873 additions and 88 deletions

View file

@ -224,7 +224,7 @@ namespace FFXIVClassic_Map_Server.lua
Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{functionName}] {e.Message}");
}
DynValue res = new DynValue();
if (!script.Globals.Get(functionName).IsNil())
{
res = script.Call(script.Globals.Get(functionName), args);
@ -234,7 +234,27 @@ namespace FFXIVClassic_Map_Server.lua
}
else
{
Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{command.name}] Unable to find script {path}");
path = $"./scripts/commands/{folder}/default.lua";
//Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{command.name}] Unable to find script {path}");
var script = LoadGlobals();
try
{
script.DoFile(path);
}
catch (Exception e)
{
Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{functionName}] {e.Message}");
}
DynValue res = new DynValue();
DynValue r = script.Globals.Get(functionName);
if (!script.Globals.Get(functionName).IsNil())
{
res = script.Call(script.Globals.Get(functionName), args);
if (res != null)
return (int)res.Number;
}
}
return -1;
}
@ -461,6 +481,7 @@ namespace FFXIVClassic_Map_Server.lua
Coroutine coroutine = script.CreateCoroutine(script.Globals[funcName]).Coroutine;
DynValue value = coroutine.Resume(args2);
ResolveResume(player, coroutine, value);
}
else
{