diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 3fdfd8a..89d7045 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; | 32 | using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; |
33 | using OpenSim.Region.Environment; | 33 | using OpenSim.Region.Environment; |
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
96 | { | 96 | { |
97 | } | 97 | } |
98 | 98 | ||
99 | private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) | 99 | private void HandleObjectPaid(UUID objectID, UUID agentID, int amount) |
100 | { | 100 | { |
101 | SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); | 101 | SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); |
102 | if (part != null) | 102 | if (part != null) |
@@ -117,7 +117,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
117 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); | 117 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); |
118 | } | 118 | } |
119 | 119 | ||
120 | public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient) | 120 | public void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient) |
121 | { | 121 | { |
122 | // Add to queue for all scripts in ObjectID object | 122 | // Add to queue for all scripts in ObjectID object |
123 | EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); | 123 | EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); |
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
135 | detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); | 135 | detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); |
136 | detstruct._string[0] = remoteClient.Name; | 136 | detstruct._string[0] = remoteClient.Name; |
137 | detstruct._int[0] = 0; | 137 | detstruct._int[0] = 0; |
138 | detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x,av.Rotation.y,av.Rotation.z,av.Rotation.w); | 138 | detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X,av.Rotation.Y,av.Rotation.Z,av.Rotation.W); |
139 | detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z); | 139 | detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z); |
140 | detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z); | 140 | detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z); |
141 | } | 141 | } |
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
170 | detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); | 170 | detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); |
171 | detstruct._string[0] = remoteClient.Name; | 171 | detstruct._string[0] = remoteClient.Name; |
172 | detstruct._int[0] = 0; | 172 | detstruct._int[0] = 0; |
173 | detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); | 173 | detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X, av.Rotation.Y, av.Rotation.Z, av.Rotation.W); |
174 | detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z); | 174 | detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z); |
175 | detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z); | 175 | detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z); |
176 | } | 176 | } |
@@ -187,14 +187,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
187 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) }); | 187 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) }); |
188 | } | 188 | } |
189 | 189 | ||
190 | public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) | 190 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez) |
191 | { | 191 | { |
192 | myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + | 192 | myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + |
193 | script.Length); | 193 | script.Length); |
194 | myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez); | 194 | myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez); |
195 | } | 195 | } |
196 | 196 | ||
197 | public void OnRemoveScript(uint localID, LLUUID itemID) | 197 | public void OnRemoveScript(uint localID, UUID itemID) |
198 | { | 198 | { |
199 | myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); | 199 | myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); |
200 | myScriptEngine.m_ScriptManager.StopScript( | 200 | myScriptEngine.m_ScriptManager.StopScript( |
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
203 | ); | 203 | ); |
204 | } | 204 | } |
205 | 205 | ||
206 | public void money(uint localID, LLUUID agentID, int amount) | 206 | public void money(uint localID, UUID agentID, int amount) |
207 | { | 207 | { |
208 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) }); | 208 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) }); |
209 | } | 209 | } |
@@ -220,12 +220,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
220 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { }); | 220 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { }); |
221 | } | 221 | } |
222 | 222 | ||
223 | public void touch(uint localID, uint originalID, LLUUID itemID) | 223 | public void touch(uint localID, uint originalID, UUID itemID) |
224 | { | 224 | { |
225 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull); | 225 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull); |
226 | } | 226 | } |
227 | 227 | ||
228 | public void touch_end(uint localID, uint originalID, LLUUID itemID) | 228 | public void touch_end(uint localID, uint originalID, UUID itemID) |
229 | { | 229 | { |
230 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) }); | 230 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) }); |
231 | } | 231 | } |
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
314 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) }); | 314 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) }); |
315 | } | 315 | } |
316 | 316 | ||
317 | public void land_collision_start(uint localID, LLUUID itemID) | 317 | public void land_collision_start(uint localID, UUID itemID) |
318 | { | 318 | { |
319 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull); | 319 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull); |
320 | } | 320 | } |
@@ -324,48 +324,48 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
324 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull); | 324 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull); |
325 | } | 325 | } |
326 | 326 | ||
327 | public void land_collision_end(uint localID, LLUUID itemID) | 327 | public void land_collision_end(uint localID, UUID itemID) |
328 | { | 328 | { |
329 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull); | 329 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull); |
330 | } | 330 | } |
331 | 331 | ||
332 | // Handled by long commands | 332 | // Handled by long commands |
333 | public void timer(uint localID, LLUUID itemID) | 333 | public void timer(uint localID, UUID itemID) |
334 | { | 334 | { |
335 | //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty); | 335 | //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty); |
336 | } | 336 | } |
337 | 337 | ||
338 | public void listen(uint localID, LLUUID itemID) | 338 | public void listen(uint localID, UUID itemID) |
339 | { | 339 | { |
340 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull); | 340 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull); |
341 | } | 341 | } |
342 | 342 | ||
343 | public void on_rez(uint localID, LLUUID itemID) | 343 | public void on_rez(uint localID, UUID itemID) |
344 | { | 344 | { |
345 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull); | 345 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull); |
346 | } | 346 | } |
347 | 347 | ||
348 | public void sensor(uint localID, LLUUID itemID) | 348 | public void sensor(uint localID, UUID itemID) |
349 | { | 349 | { |
350 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull); | 350 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull); |
351 | } | 351 | } |
352 | 352 | ||
353 | public void no_sensor(uint localID, LLUUID itemID) | 353 | public void no_sensor(uint localID, UUID itemID) |
354 | { | 354 | { |
355 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull); | 355 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull); |
356 | } | 356 | } |
357 | 357 | ||
358 | public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change) | 358 | public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change) |
359 | { | 359 | { |
360 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)}); | 360 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)}); |
361 | } | 361 | } |
362 | 362 | ||
363 | public void email(uint localID, LLUUID itemID) | 363 | public void email(uint localID, UUID itemID) |
364 | { | 364 | { |
365 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); | 365 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); |
366 | } | 366 | } |
367 | 367 | ||
368 | public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos) | 368 | public void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos) |
369 | { | 369 | { |
370 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); | 370 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); |
371 | } | 371 | } |
@@ -375,63 +375,63 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
375 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull); | 375 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull); |
376 | } | 376 | } |
377 | 377 | ||
378 | public void at_rot_target(uint localID, LLUUID itemID) | 378 | public void at_rot_target(uint localID, UUID itemID) |
379 | { | 379 | { |
380 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull); | 380 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull); |
381 | } | 381 | } |
382 | 382 | ||
383 | public void not_at_rot_target(uint localID, LLUUID itemID) | 383 | public void not_at_rot_target(uint localID, UUID itemID) |
384 | { | 384 | { |
385 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull); | 385 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull); |
386 | } | 386 | } |
387 | 387 | ||
388 | public void run_time_permissions(uint localID, LLUUID itemID) | 388 | public void run_time_permissions(uint localID, UUID itemID) |
389 | { | 389 | { |
390 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull); | 390 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull); |
391 | } | 391 | } |
392 | 392 | ||
393 | public void changed(uint localID, LLUUID itemID) | 393 | public void changed(uint localID, UUID itemID) |
394 | { | 394 | { |
395 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull); | 395 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull); |
396 | } | 396 | } |
397 | 397 | ||
398 | public void attach(uint localID, LLUUID itemID) | 398 | public void attach(uint localID, UUID itemID) |
399 | { | 399 | { |
400 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull); | 400 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull); |
401 | } | 401 | } |
402 | 402 | ||
403 | public void dataserver(uint localID, LLUUID itemID) | 403 | public void dataserver(uint localID, UUID itemID) |
404 | { | 404 | { |
405 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull); | 405 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull); |
406 | } | 406 | } |
407 | 407 | ||
408 | public void link_message(uint localID, LLUUID itemID) | 408 | public void link_message(uint localID, UUID itemID) |
409 | { | 409 | { |
410 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull); | 410 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull); |
411 | } | 411 | } |
412 | 412 | ||
413 | public void moving_start(uint localID, LLUUID itemID) | 413 | public void moving_start(uint localID, UUID itemID) |
414 | { | 414 | { |
415 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull); | 415 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull); |
416 | } | 416 | } |
417 | 417 | ||
418 | public void moving_end(uint localID, LLUUID itemID) | 418 | public void moving_end(uint localID, UUID itemID) |
419 | { | 419 | { |
420 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull); | 420 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull); |
421 | } | 421 | } |
422 | 422 | ||
423 | public void object_rez(uint localID, LLUUID itemID) | 423 | public void object_rez(uint localID, UUID itemID) |
424 | { | 424 | { |
425 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull); | 425 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull); |
426 | } | 426 | } |
427 | 427 | ||
428 | public void remote_data(uint localID, LLUUID itemID) | 428 | public void remote_data(uint localID, UUID itemID) |
429 | { | 429 | { |
430 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull); | 430 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull); |
431 | } | 431 | } |
432 | 432 | ||
433 | // Handled by long commands | 433 | // Handled by long commands |
434 | public void http_response(uint localID, LLUUID itemID) | 434 | public void http_response(uint localID, UUID itemID) |
435 | { | 435 | { |
436 | // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull); | 436 | // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull); |
437 | } | 437 | } |