From 82d43db1ccbc2b13e21c88650165f82651b657e1 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Thu, 17 Jan 2008 15:22:35 +0000 Subject: [PATCH] Added data structure to be passed through event execution queue so that events can use llDetect*-commands to find information about event. --- OpenSim/Region/ScriptEngine/Common/IScript.cs | 3 + .../ScriptEngine/Common/LSL_BaseClass.cs | 9 +++ .../Common/LSL_BuiltIn_Commands.cs | 3 +- .../Common/ScriptEngineBase/EventManager.cs | 64 +++++++++---------- .../ScriptEngineBase/EventQueueManager.cs | 36 +++++++++-- .../ScriptEngineBase/LSLLongCmdHandler.cs | 8 +-- .../Common/ScriptEngineBase/ScriptManager.cs | 3 +- .../DotNetEngine/ScriptManager.cs | 3 +- .../ScriptEngine/LSOEngine/ScriptManager.cs | 3 +- 9 files changed, 85 insertions(+), 47 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/IScript.cs b/OpenSim/Region/ScriptEngine/Common/IScript.cs index c94b187fbf..2e1b143903 100644 --- a/OpenSim/Region/ScriptEngine/Common/IScript.cs +++ b/OpenSim/Region/ScriptEngine/Common/IScript.cs @@ -26,6 +26,8 @@ * */ +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; + namespace OpenSim.Region.ScriptEngine.Common { public interface IScript @@ -34,5 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common Executor Exec { get; } string Source { get; set; } void Start(LSL_BuiltIn_Commands_Interface BuiltIn_Commands); + EventQueueManager.Queue_llDetectParams_Struct llDetectParams { get; set; } } } \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs index 5149f3aa09..bd64ee0ca7 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; using System.Threading; using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; using integer = System.Int32; using key = System.String; using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; @@ -64,6 +65,12 @@ namespace OpenSim.Region.ScriptEngine.Common return lease; } + public EventQueueManager.Queue_llDetectParams_Struct _llDetectParams; + EventQueueManager.Queue_llDetectParams_Struct IScript.llDetectParams + { + get { return _llDetectParams; } + set { _llDetectParams = value; } + } private Executor m_Exec; @@ -127,6 +134,8 @@ namespace OpenSim.Region.ScriptEngine.Common } + + // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index c1963228c2..58e47274ba 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -37,6 +37,7 @@ using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.Common @@ -2368,7 +2369,7 @@ namespace OpenSim.Region.ScriptEngine.Common { LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID); object[] resobj = new object[] { 1, channelID.ToString(), LLUUID.Zero.ToString(), String.Empty, 0, String.Empty }; - m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", resobj); + m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index a32a132569..250a5df6fa 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -76,13 +76,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void changed(uint localID, uint change) { // Add to queue for all scripts in localID, Object pass change. - myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID,"changed", new object[] {(int) change}); + myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change }); } public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) { // Add to queue for all scripts in ObjectID object - myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] {(int) 1}); + myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", EventQueueManager.llDetectNull, new object[] { (int)1 }); } public void OnRezScript(uint localID, LLUUID itemID, string script) @@ -109,47 +109,47 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void state_exit(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_exit"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_exit", EventQueueManager.llDetectNull); } public void touch(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull); } public void touch_end(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull); } public void collision_start(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start", EventQueueManager.llDetectNull); } public void collision(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision", EventQueueManager.llDetectNull); } public void collision_end(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end", EventQueueManager.llDetectNull); } public void land_collision_start(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull); } public void land_collision(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision", EventQueueManager.llDetectNull); } public void land_collision_end(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull); } // Handled by long commands @@ -160,108 +160,108 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void listen(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull); } public void on_rez(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull); } public void sensor(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull); } public void no_sensor(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull); } public void control(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull); } public void money(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "money"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "money", EventQueueManager.llDetectNull); } public void email(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); } public void at_target(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_target"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_target", EventQueueManager.llDetectNull); } public void not_at_target(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_target"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_target", EventQueueManager.llDetectNull); } public void at_rot_target(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull); } public void not_at_rot_target(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull); } public void run_time_permissions(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull); } public void changed(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull); } public void attach(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull); } public void dataserver(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull); } public void link_message(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull); } public void moving_start(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull); } public void moving_end(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull); } public void object_rez(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull); } public void remote_data(uint localID, LLUUID itemID) { - myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data"); + myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull); } // Handled by long commands public void http_response(uint localID, LLUUID itemID) { - // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response"); + // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull); } } } \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index af9102730b..ced4863074 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs @@ -96,9 +96,30 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public uint localID; public LLUUID itemID; public string functionName; + public Queue_llDetectParams_Struct llDetectParams; public object[] param; } + /// + /// Shared empty llDetectNull + /// + public readonly static Queue_llDetectParams_Struct llDetectNull = new Queue_llDetectParams_Struct(); + + /// + /// Structure to hold data for llDetect* commands + /// + public struct Queue_llDetectParams_Struct + { + // More or less just a placeholder for the actual moving of additional data + // should be fixed to something better :) + public LSL_Types.key[] _key; + public LSL_Types.Quaternion[] _Quaternion; + public LSL_Types.Vector3[] _Vector3; + public bool[] _bool; + public int[] _int; + public string [] _string; + } + /// /// List of localID locks for mutex processing of script events /// @@ -211,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase + ", QIS.functionName: " + QIS.functionName); #endif m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, - QIS.functionName, QIS.param); + QIS.functionName, QIS.llDetectParams, QIS.param); } catch (Exception e) { @@ -311,10 +332,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// /// Add event to event execution queue /// - /// + /// Region object ID /// Name of the function, will be state + "_event_" + FunctionName /// Array of parameters to match event mask - public void AddToObjectQueue(uint localID, string FunctionName, params object[] param) + public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) { // Determine all scripts in Object and add to their queue //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); @@ -334,18 +355,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { // Add to each script in that object // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? - AddToScriptQueue(localID, itemID, FunctionName, param); + AddToScriptQueue(localID, itemID, FunctionName, qParams, param); } } /// /// Add event to event execution queue /// - /// - /// + /// Region object ID + /// Region script ID /// Name of the function, will be state + "_event_" + FunctionName /// Array of parameters to match event mask - public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, params object[] param) + public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) { lock (queueLock) { @@ -354,6 +375,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase QIS.localID = localID; QIS.itemID = itemID; QIS.functionName = FunctionName; + QIS.llDetectParams = qParams; QIS.param = param; // Add it to queue diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/LSLLongCmdHandler.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/LSLLongCmdHandler.cs index 7271d729eb..7d66638f7a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/LSLLongCmdHandler.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/LSLLongCmdHandler.cs @@ -185,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime()) { // Add it to queue - m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", + m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull, new object[] {}); // set next interval @@ -230,7 +230,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( - httpInfo.localID, httpInfo.itemID, "http_response", resobj + httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj ); httpInfo.Stop(); @@ -264,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase rInfo.GetStrVal() }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( - rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", resobj + rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj ); } } @@ -287,7 +287,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( - lInfo.GetLocalID(), lInfo.GetItemID(), "listen", resobj + lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj ); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 784e849a0a..ea87581d59 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -232,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// Script ID /// Name of function /// Arguments to pass to function - internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, object[] args) + internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args) { #if DEBUG Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); @@ -247,6 +247,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase Console.WriteLine("ScriptEngine: Executing event: " + FunctionName); #endif // Must be done in correct AppDomain, so leaving it up to the script itself + Script.llDetectParams = qParams; Script.Exec.ExecuteEvent(FunctionName, args); } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 2bb40eebbd..3bc64beb79 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -36,6 +36,7 @@ using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.DotNetEngine @@ -99,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine CompiledScript.Start(LSLB); // Fire the first start-event - m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] { }); + m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } catch (Exception e) { diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index bd26ce49df..de7b46648a 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs @@ -36,6 +36,7 @@ using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.LSOEngine { @@ -96,7 +97,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine CompiledScript.Start(LSLB); // Fire the first start-event - m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] { }); + m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } catch (Exception e) {