public void ExecuteCommand(ref ScriptStructure scriptContainer, EventParams p) { m_log.DebugFormat("[{0}] ######################################################", Name); m_log.DebugFormat("[{0}] Command execution ItemID {1}: \"{2}\".", Name, scriptContainer.ItemID, p.EventName); scriptContainer.ExecuteEvent(p); m_log.DebugFormat("[{0}] ######################################################", Name); }
public void ExecuteCommand(EventParams p) { ScriptStructure ss = new ScriptStructure(); if (TryGetScript(p.LocalID, p.ItemID, ref ss)) { ExecuteCommand(ref ss, p); } }
public void Executors_Execute(ScriptStructure scriptContainer, EventParams p) { // Execute a command on all executors lock (Executors) { foreach (IScriptExecutor exec in Executors.Values) { exec.ExecuteCommand(ref scriptContainer, p); } } }
public void Executors_Execute(EventParams p) { // Execute a command on all executors lock (Executors) { foreach (IScriptExecutor exec in Executors.Values) { exec.ExecuteCommand(p); } } }
private void ExecuteMethod(EventParams p, bool isEvent) { // First time initialization? if (!Initialized) { Initialized = true; CacheInternalFunctions(); } lock (InternalFunctions) { // Make function name string FunctionName; if (isEvent) { FunctionName = State + "_event_" + p.EventName; } else { FunctionName = p.EventName; } // Check if this function exist if (!InternalFunctions.ContainsKey(FunctionName)) { // TODO: Send message in-world m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName); return; } // Execute script function try { InternalFunctions[FunctionName].DynamicInvoke(p.Params); } catch (Exception e) { m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString()); } } }
private void ExecuteMethod(EventParams p, bool isEvent) { // First time initialization? if (!Initialized) { Initialized = true; CacheInternalFunctions(); } lock (InternalFunctions) { // Make function name string FunctionName; if (isEvent) FunctionName = State + "_event_" + p.EventName; else FunctionName = p.EventName; // Check if this function exist if (!InternalFunctions.ContainsKey(FunctionName)) { // TODO: Send message in-world m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName); return; } // Execute script function try { InternalFunctions[FunctionName].DynamicInvoke(p.Params); } catch (Exception e) { m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString()); } } }
public void ExecuteMethod(EventParams p) { ExecuteMethod(p, false); }
public void ExecuteEvent(EventParams p) { ExecuteMethod(p, true); }
public void ExecuteCommand(EventParams p) { ScriptStructure ss = new ScriptStructure(); if (TryGetScript(p.LocalID, p.ItemID, ref ss)) ExecuteCommand(ref ss, p); }