mirror of
https://github.com/opensim/opensim.git
synced 2026-05-18 04:45:35 +08:00
Add a hust UUID to the script invocations
This commit is contained in:
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
|
||||
|
||||
public void RegisterScriptInvocation(object target, string meth)
|
||||
{
|
||||
MethodInfo mi = target.GetType()..GetMethod(meth,
|
||||
MethodInfo mi = target.GetType().GetMethod(meth,
|
||||
BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
|
||||
Type delegateType;
|
||||
|
||||
@@ -153,13 +153,13 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
|
||||
lock (m_scriptInvocation)
|
||||
{
|
||||
ParameterInfo[] parameters = fcall.Method.GetParameters ();
|
||||
if (parameters.Length == 0) // Must have one UUID param
|
||||
if (parameters.Length < 2) // Must have two UUID params
|
||||
return;
|
||||
|
||||
// Hide the first parameter
|
||||
Type[] parmTypes = new Type[parameters.Length - 1];
|
||||
for (int i = 1 ; i < parameters.Length ; i++)
|
||||
parmTypes[i - 1] = parameters[i].ParameterType;
|
||||
// Hide the first two parameters
|
||||
Type[] parmTypes = new Type[parameters.Length - 2];
|
||||
for (int i = 2 ; i < parameters.Length ; i++)
|
||||
parmTypes[i - 2] = parameters[i].ParameterType;
|
||||
m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType);
|
||||
}
|
||||
}
|
||||
@@ -239,9 +239,10 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
|
||||
return null;
|
||||
}
|
||||
|
||||
public object InvokeOperation(UUID scriptid, string fname, params object[] parms)
|
||||
public object InvokeOperation(UUID hostid, UUID scriptid, string fname, params object[] parms)
|
||||
{
|
||||
List<object> olist = new List<object>();
|
||||
olist.Add(hostid);
|
||||
olist.Add(scriptid);
|
||||
foreach (object o in parms)
|
||||
olist.Add(o);
|
||||
|
||||
Reference in New Issue
Block a user