Got the kick event packet working and implemented the director parameter in the player instantiation. The first argument of the set event status packet is an "isEnabled" flag; switched to bool rather than int.

This commit is contained in:
Filip Maj 2016-04-01 23:24:14 -04:00
parent 597a800599
commit 6c3918ac2f
6 changed files with 39 additions and 46 deletions

View file

@ -93,7 +93,9 @@ namespace FFXIVClassic_Map_Server.lua
objects.Add(player);
objects.Add(target);
objects.Add(eventStart.triggerName);
objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams));
if (eventStart.luaParams != null)
objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams));
//Run Script
DynValue result = script.Call(script.Globals["onEventStarted"], objects.ToArray());
@ -110,12 +112,14 @@ namespace FFXIVClassic_Map_Server.lua
public static void doActorOnEventUpdated(Player player, Actor target, EventUpdatePacket eventUpdate)
{
string luaPath;
string luaPath;
if (target is Command)
luaPath = String.Format(FILEPATH_COMMANDS, target.getName());
else if (target is Director)
luaPath = String.Format(FILEPATH_DIRECTORS, target.getName());
else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName());
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName());
if (File.Exists(luaPath))
{