diff options
author | Melanie | 2012-03-26 14:19:55 +0100 |
---|---|---|
committer | Melanie | 2012-03-26 14:19:55 +0100 |
commit | 7e0936e4b6ec0596390266a8435dea9c3f19f09c (patch) | |
tree | 7da6768edda1ccbecab7fe4e632c3cfb07114c4d /OpenSim/Region/OptionalModules | |
parent | Fix the omission on the interface declaration (diff) | |
download | opensim-SC-7e0936e4b6ec0596390266a8435dea9c3f19f09c.zip opensim-SC-7e0936e4b6ec0596390266a8435dea9c3f19f09c.tar.gz opensim-SC-7e0936e4b6ec0596390266a8435dea9c3f19f09c.tar.bz2 opensim-SC-7e0936e4b6ec0596390266a8435dea9c3f19f09c.tar.xz |
Add a hust UUID to the script invocations
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 7fc8759..1e755ba 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
130 | 130 | ||
131 | public void RegisterScriptInvocation(object target, string meth) | 131 | public void RegisterScriptInvocation(object target, string meth) |
132 | { | 132 | { |
133 | MethodInfo mi = target.GetType()..GetMethod(meth, | 133 | MethodInfo mi = target.GetType().GetMethod(meth, |
134 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | 134 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); |
135 | Type delegateType; | 135 | Type delegateType; |
136 | 136 | ||
@@ -153,13 +153,13 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
153 | lock (m_scriptInvocation) | 153 | lock (m_scriptInvocation) |
154 | { | 154 | { |
155 | ParameterInfo[] parameters = fcall.Method.GetParameters (); | 155 | ParameterInfo[] parameters = fcall.Method.GetParameters (); |
156 | if (parameters.Length == 0) // Must have one UUID param | 156 | if (parameters.Length < 2) // Must have two UUID params |
157 | return; | 157 | return; |
158 | 158 | ||
159 | // Hide the first parameter | 159 | // Hide the first two parameters |
160 | Type[] parmTypes = new Type[parameters.Length - 1]; | 160 | Type[] parmTypes = new Type[parameters.Length - 2]; |
161 | for (int i = 1 ; i < parameters.Length ; i++) | 161 | for (int i = 2 ; i < parameters.Length ; i++) |
162 | parmTypes[i - 1] = parameters[i].ParameterType; | 162 | parmTypes[i - 2] = parameters[i].ParameterType; |
163 | m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType); | 163 | m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType); |
164 | } | 164 | } |
165 | } | 165 | } |
@@ -239,9 +239,10 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
239 | return null; | 239 | return null; |
240 | } | 240 | } |
241 | 241 | ||
242 | public object InvokeOperation(UUID scriptid, string fname, params object[] parms) | 242 | public object InvokeOperation(UUID hostid, UUID scriptid, string fname, params object[] parms) |
243 | { | 243 | { |
244 | List<object> olist = new List<object>(); | 244 | List<object> olist = new List<object>(); |
245 | olist.Add(hostid); | ||
245 | olist.Add(scriptid); | 246 | olist.Add(scriptid); |
246 | foreach (object o in parms) | 247 | foreach (object o in parms) |
247 | olist.Add(o); | 248 | olist.Add(o); |