Added a thread and update() calls for gamestate changing.

This commit is contained in:
Filip Maj 2017-01-16 19:14:13 -05:00
parent 6a6ee67ae2
commit 9372b4bc32
7 changed files with 78 additions and 0 deletions

View file

@ -203,6 +203,21 @@ namespace FFXIVClassic_Map_Server.lua
}
}
public static void OnPlayerUpdate(Player player, double delta)
{
if (File.Exists(FILEPATH_PLAYER))
{
LuaScript script = LoadScript(FILEPATH_PLAYER);
if (script == null)
return;
//Run Script
if (!script.Globals.Get("onUpdate").IsNil())
script.Call(script.Globals["onUpdate"], player);
}
}
#region RunGMCommand
public static void RunGMCommand(Player player, String cmd, string[] param, bool help = false)
{