aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs64
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs48
8 files changed, 97 insertions, 97 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
index 64f6970..ee86500 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections; 28using System.Collections;
29using System.Threading; 29using System.Threading;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; 33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
153 /// </summary> 153 /// </summary>
154 /// <param name="localID"></param> 154 /// <param name="localID"></param>
155 /// <param name="itemID"></param> 155 /// <param name="itemID"></param>
156 public void RemoveScript(uint localID, LLUUID itemID) 156 public void RemoveScript(uint localID, UUID itemID)
157 { 157 {
158 // Remove a specific script 158 // Remove a specific script
159 159
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index 77cc7ea..378610a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34 34
@@ -48,28 +48,28 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
48 private class DataserverRequest 48 private class DataserverRequest
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 52
53 public LLUUID ID; 53 public UUID ID;
54 public string handle; 54 public string handle;
55 55
56 public DateTime startTime; 56 public DateTime startTime;
57 } 57 }
58 58
59 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 59 public UUID RegisterRequest(uint localID, UUID itemID,
60 string identifier) 60 string identifier)
61 { 61 {
62 lock (DataserverRequests) 62 lock (DataserverRequests)
63 { 63 {
64 if (DataserverRequests.ContainsKey(identifier)) 64 if (DataserverRequests.ContainsKey(identifier))
65 return LLUUID.Zero; 65 return UUID.Zero;
66 66
67 DataserverRequest ds = new DataserverRequest(); 67 DataserverRequest ds = new DataserverRequest();
68 68
69 ds.localID = localID; 69 ds.localID = localID;
70 ds.itemID = itemID; 70 ds.itemID = itemID;
71 71
72 ds.ID = LLUUID.Random(); 72 ds.ID = UUID.Random();
73 ds.handle = identifier; 73 ds.handle = identifier;
74 74
75 ds.startTime = DateTime.Now; 75 ds.startTime = DateTime.Now;
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
99 new LSL_Types.LSLString(reply)}); 99 new LSL_Types.LSLString(reply)});
100 } 100 }
101 101
102 public void RemoveEvents(uint localID, LLUUID itemID) 102 public void RemoveEvents(uint localID, UUID itemID)
103 { 103 {
104 lock (DataserverRequests) 104 lock (DataserverRequests)
105 { 105 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 9b636fd..0fce1f2 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
27//#define SPAM 27//#define SPAM
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
@@ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
43 m_CmdManager = CmdManager; 43 m_CmdManager = CmdManager;
44 } 44 }
45 45
46 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 46 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
47 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 47 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
48 private Object SenseLock = new Object(); 48 private Object SenseLock = new Object();
49 49
50 // 50 //
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
53 private class SenseRepeatClass 53 private class SenseRepeatClass
54 { 54 {
55 public uint localID; 55 public uint localID;
56 public LLUUID itemID; 56 public UUID itemID;
57 public double interval; 57 public double interval;
58 public DateTime next; 58 public DateTime next;
59 59
60 public string name; 60 public string name;
61 public LLUUID keyID; 61 public UUID keyID;
62 public int type; 62 public int type;
63 public double range; 63 public double range;
64 public double arc; 64 public double arc;
@@ -68,8 +68,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
69 private object SenseRepeatListLock = new object(); 69 private object SenseRepeatListLock = new object();
70 70
71 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 71 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
72 string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) 72 string name, UUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
73 { 73 {
74 #if SPAM 74 #if SPAM
75 Console.WriteLine("SetSensorEvent"); 75 Console.WriteLine("SetSensorEvent");
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 #if SPAM 166 #if SPAM
@@ -199,11 +199,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
199 } 199 }
200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan"); 200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan");
201 201
202 LLVector3 sensorPos = SensePoint.AbsolutePosition; 202 Vector3 sensorPos = SensePoint.AbsolutePosition;
203 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 203 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
204 LLVector3 fromRegionPos = sensorPos + regionPos; 204 Vector3 fromRegionPos = sensorPos + regionPos;
205 205
206 LLQuaternion q = SensePoint.RotationOffset; 206 Quaternion q = SensePoint.RotationOffset;
207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
215 215
216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
217 { 217 {
218 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 218 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
220 if (dis <= ts.range) 220 if (dis <= ts.range)
221 { 221 {
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
248 double ang_obj = 0; 248 double ang_obj = 0;
249 try 249 try
250 { 250 {
251 LLVector3 diff = toRegionPos - fromRegionPos; 251 Vector3 diff = toRegionPos - fromRegionPos;
252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
261 if (ang_obj > ts.arc) keep = false; 261 if (ang_obj > ts.arc) keep = false;
262 } 262 }
263 263
264 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 264 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
265 { 265 {
266 keep = false; 266 keep = false;
267 } 267 }
@@ -303,10 +303,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
303 // Create object if it doesn't exist 303 // Create object if it doesn't exist
304 if (SenseEvents.ContainsKey(ts.localID) == false) 304 if (SenseEvents.ContainsKey(ts.localID) == false)
305 { 305 {
306 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 306 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
307 } 307 }
308 // clear if previous traces exist 308 // clear if previous traces exist
309 Dictionary<LLUUID, LSL_Types.list> Obj; 309 Dictionary<UUID, LSL_Types.list> Obj;
310 SenseEvents.TryGetValue(ts.localID, out Obj); 310 SenseEvents.TryGetValue(ts.localID, out Obj);
311 if (Obj.ContainsKey(ts.itemID) == true) 311 if (Obj.ContainsKey(ts.itemID) == true)
312 Obj.Remove(ts.itemID); 312 Obj.Remove(ts.itemID);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 09af34a..7940b36 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34{ 34{
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
47 private class TimerClass 47 private class TimerClass
48 { 48 {
49 public uint localID; 49 public uint localID;
50 public LLUUID itemID; 50 public UUID itemID;
51 //public double interval; 51 //public double interval;
52 public long interval; 52 public long interval;
53 //public DateTime next; 53 //public DateTime next;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
57 private List<TimerClass> Timers = new List<TimerClass>(); 57 private List<TimerClass> Timers = new List<TimerClass>();
58 private object TimerListLock = new object(); 58 private object TimerListLock = new object();
59 59
60 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 60 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
61 { 61 {
62 // Console.WriteLine("SetTimerEvent"); 62 // Console.WriteLine("SetTimerEvent");
63 63
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
82 } 82 }
83 } 83 }
84 84
85 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 85 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
86 { 86 {
87 // Remove from timer 87 // Remove from timer
88 lock (TimerListLock) 88 lock (TimerListLock)
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
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
33using OpenSim.Region.Environment; 33using 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 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 5c57874..1a08795 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
34{ 34{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
134 public struct QueueItemStruct 134 public struct QueueItemStruct
135 { 135 {
136 public uint localID; 136 public uint localID;
137 public LLUUID itemID; 137 public UUID itemID;
138 public string functionName; 138 public string functionName;
139 public Queue_llDetectParams_Struct llDetectParams; 139 public Queue_llDetectParams_Struct llDetectParams;
140 public object[] param; 140 public object[] param;
@@ -308,10 +308,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
308 return; 308 return;
309 } 309 }
310 310
311 Dictionary<LLUUID, IScript>.KeyCollection scriptKeys = 311 Dictionary<UUID, IScript>.KeyCollection scriptKeys =
312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID); 312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID);
313 313
314 foreach (LLUUID itemID in scriptKeys) 314 foreach (UUID itemID in scriptKeys)
315 { 315 {
316 // Add to each script in that object 316 // Add to each script in that object
317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? 317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
326 /// <param name="itemID">Region script ID</param> 326 /// <param name="itemID">Region script ID</param>
327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> 327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
328 /// <param name="param">Array of parameters to match event mask</param> 328 /// <param name="param">Array of parameters to match event mask</param>
329 public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) 329 public void AddToScriptQueue(uint localID, UUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
330 { 330 {
331 lock (eventQueue) 331 lock (eventQueue)
332 { 332 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 4376e00..1e71ae5 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -31,7 +31,7 @@ using System.Reflection;
31using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using System.Threading; 32using System.Threading;
33using System.Globalization; 33using System.Globalization;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Scenes.Scripting; 37using OpenSim.Region.Environment.Scenes.Scripting;
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); 327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID);
328 //if (m_host != null) 328 //if (m_host != null)
329 //{ 329 //{
330 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 330 m_ScriptEngine.World.SimChat(Utils.StringToBytes(text),
331 ChatTypeEnum.DebugChannel, 2147483647, 331 ChatTypeEnum.DebugChannel, 2147483647,
332 m_host.AbsolutePosition, 332 m_host.AbsolutePosition,
333 m_host.Name, m_host.UUID, false); 333 m_host.Name, m_host.UUID, false);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 99bbdee..60333b1 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Runtime.Serialization.Formatters.Binary; 32using System.Runtime.Serialization.Formatters.Binary;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36 36
37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
69 private struct LUStruct 69 private struct LUStruct
70 { 70 {
71 public uint localID; 71 public uint localID;
72 public LLUUID itemID; 72 public UUID itemID;
73 public string script; 73 public string script;
74 public LUType Action; 74 public LUType Action;
75 public int startParam; 75 public int startParam;
@@ -84,13 +84,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
84 } 84 }
85 85
86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse 86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse
87 public Dictionary<LLUUID, String> scriptList = new Dictionary<LLUUID, string>(); 87 public Dictionary<UUID, String> scriptList = new Dictionary<UUID, string>();
88 88
89 // Object<string, Script<string, script>> 89 // Object<string, Script<string, script>>
90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. 90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.
91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! 91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead!
92 public Dictionary<uint, Dictionary<LLUUID, IScript>> Scripts = 92 public Dictionary<uint, Dictionary<UUID, IScript>> Scripts =
93 new Dictionary<uint, Dictionary<LLUUID, IScript>>(); 93 new Dictionary<uint, Dictionary<UUID, IScript>>();
94 94
95 95
96 public Scene World 96 public Scene World
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
254 /// </summary> 254 /// </summary>
255 /// <param name="itemID"></param> 255 /// <param name="itemID"></param>
256 /// <param name="localID"></param> 256 /// <param name="localID"></param>
257 public void StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 257 public void StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
258 { 258 {
259 lock (LUQueue) 259 lock (LUQueue)
260 { 260 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
280 /// </summary> 280 /// </summary>
281 /// <param name="localID"></param> 281 /// <param name="localID"></param>
282 /// <param name="itemID"></param> 282 /// <param name="itemID"></param>
283 public void StopScript(uint localID, LLUUID itemID) 283 public void StopScript(uint localID, UUID itemID)
284 { 284 {
285 LUStruct ls = new LUStruct(); 285 LUStruct ls = new LUStruct();
286 ls.localID = localID; 286 ls.localID = localID;
@@ -297,8 +297,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
297 // Create a new instance of the compiler (reuse) 297 // Create a new instance of the compiler (reuse)
298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler(); 298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
299 299
300 public abstract void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez); 300 public abstract void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez);
301 public abstract void _StopScript(uint localID, LLUUID itemID); 301 public abstract void _StopScript(uint localID, UUID itemID);
302 302
303 303
304 #endregion 304 #endregion
@@ -312,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
312 /// <param name="itemID">Script ID</param> 312 /// <param name="itemID">Script ID</param>
313 /// <param name="FunctionName">Name of function</param> 313 /// <param name="FunctionName">Name of function</param>
314 /// <param name="args">Arguments to pass to function</param> 314 /// <param name="args">Arguments to pass to function</param>
315 internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args) 315 internal void ExecuteEvent(uint localID, UUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
316 { 316 {
317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined 317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined
318 ///#if DEBUG 318 ///#if DEBUG
@@ -335,7 +335,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
335 Script.Exec.ExecuteEvent(FunctionName, args); 335 Script.Exec.ExecuteEvent(FunctionName, args);
336 } 336 }
337 337
338 public int GetStateEventFlags(uint localID, LLUUID itemID) 338 public int GetStateEventFlags(uint localID, UUID itemID)
339 { 339 {
340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">"); 340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">");
341 try 341 try
@@ -360,25 +360,25 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
360 360
361 #region Internal functions to keep track of script 361 #region Internal functions to keep track of script
362 362
363 public Dictionary<LLUUID, IScript>.KeyCollection GetScriptKeys(uint localID) 363 public Dictionary<UUID, IScript>.KeyCollection GetScriptKeys(uint localID)
364 { 364 {
365 if (Scripts.ContainsKey(localID) == false) 365 if (Scripts.ContainsKey(localID) == false)
366 return null; 366 return null;
367 367
368 Dictionary<LLUUID, IScript> Obj; 368 Dictionary<UUID, IScript> Obj;
369 Scripts.TryGetValue(localID, out Obj); 369 Scripts.TryGetValue(localID, out Obj);
370 370
371 return Obj.Keys; 371 return Obj.Keys;
372 } 372 }
373 373
374 public IScript GetScript(uint localID, LLUUID itemID) 374 public IScript GetScript(uint localID, UUID itemID)
375 { 375 {
376 lock (scriptLock) 376 lock (scriptLock)
377 { 377 {
378 if (Scripts.ContainsKey(localID) == false) 378 if (Scripts.ContainsKey(localID) == false)
379 return null; 379 return null;
380 380
381 Dictionary<LLUUID, IScript> Obj; 381 Dictionary<UUID, IScript> Obj;
382 Scripts.TryGetValue(localID, out Obj); 382 Scripts.TryGetValue(localID, out Obj);
383 if (Obj.ContainsKey(itemID) == false) 383 if (Obj.ContainsKey(itemID) == false)
384 return null; 384 return null;
@@ -390,18 +390,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
390 } 390 }
391 } 391 }
392 392
393 public void SetScript(uint localID, LLUUID itemID, IScript Script) 393 public void SetScript(uint localID, UUID itemID, IScript Script)
394 { 394 {
395 lock (scriptLock) 395 lock (scriptLock)
396 { 396 {
397 // Create object if it doesn't exist 397 // Create object if it doesn't exist
398 if (Scripts.ContainsKey(localID) == false) 398 if (Scripts.ContainsKey(localID) == false)
399 { 399 {
400 Scripts.Add(localID, new Dictionary<LLUUID, IScript>()); 400 Scripts.Add(localID, new Dictionary<UUID, IScript>());
401 } 401 }
402 402
403 // Delete script if it exists 403 // Delete script if it exists
404 Dictionary<LLUUID, IScript> Obj; 404 Dictionary<UUID, IScript> Obj;
405 Scripts.TryGetValue(localID, out Obj); 405 Scripts.TryGetValue(localID, out Obj);
406 if (Obj.ContainsKey(itemID) == true) 406 if (Obj.ContainsKey(itemID) == true)
407 Obj.Remove(itemID); 407 Obj.Remove(itemID);
@@ -411,14 +411,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
411 } 411 }
412 } 412 }
413 413
414 public void RemoveScript(uint localID, LLUUID itemID) 414 public void RemoveScript(uint localID, UUID itemID)
415 { 415 {
416 // Don't have that object? 416 // Don't have that object?
417 if (Scripts.ContainsKey(localID) == false) 417 if (Scripts.ContainsKey(localID) == false)
418 return; 418 return;
419 419
420 // Delete script if it exists 420 // Delete script if it exists
421 Dictionary<LLUUID, IScript> Obj; 421 Dictionary<UUID, IScript> Obj;
422 Scripts.TryGetValue(localID, out Obj); 422 Scripts.TryGetValue(localID, out Obj);
423 if (Obj.ContainsKey(itemID) == true) 423 if (Obj.ContainsKey(itemID) == true)
424 Obj.Remove(itemID); 424 Obj.Remove(itemID);
@@ -427,21 +427,21 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
427 #endregion 427 #endregion
428 428
429 429
430 public void ResetScript(uint localID, LLUUID itemID) 430 public void ResetScript(uint localID, UUID itemID)
431 { 431 {
432 IScript s = GetScript(localID, itemID); 432 IScript s = GetScript(localID, itemID);
433 string script = s.Source; 433 string script = s.Source;
434 StopScript(localID, itemID); 434 StopScript(localID, itemID);
435 SceneObjectPart part = World.GetSceneObjectPart(localID); 435 SceneObjectPart part = World.GetSceneObjectPart(localID);
436 part.GetInventoryItem(itemID).PermsMask = 0; 436 part.GetInventoryItem(itemID).PermsMask = 0;
437 part.GetInventoryItem(itemID).PermsGranter = LLUUID.Zero; 437 part.GetInventoryItem(itemID).PermsGranter = UUID.Zero;
438 StartScript(localID, itemID, script, s.StartParam, false); 438 StartScript(localID, itemID, script, s.StartParam, false);
439 } 439 }
440 440
441 441
442 #region Script serialization/deserialization 442 #region Script serialization/deserialization
443 443
444 public void GetSerializedScript(uint localID, LLUUID itemID) 444 public void GetSerializedScript(uint localID, UUID itemID)
445 { 445 {
446 // Serialize the script and return it 446 // Serialize the script and return it
447 // Should not be a problem 447 // Should not be a problem
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
451 fs.Close(); 451 fs.Close();
452 } 452 }
453 453
454 public void PutSerializedScript(uint localID, LLUUID itemID) 454 public void PutSerializedScript(uint localID, UUID itemID)
455 { 455 {
456 // Deserialize the script and inject it into an AppDomain 456 // Deserialize the script and inject it into an AppDomain
457 457