diff options
Diffstat (limited to 'OpenSim')
5 files changed, 22 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index f76f882..edc8886 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
539 | /// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/> | 539 | /// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/> |
540 | /// </remarks> | 540 | /// </remarks> |
541 | public event ScriptChangedEvent OnScriptChangedEvent; | 541 | public event ScriptChangedEvent OnScriptChangedEvent; |
542 | public delegate void ScriptChangedEvent(uint localID, uint change); | 542 | public delegate void ScriptChangedEvent(uint localID, uint change, object data); |
543 | 543 | ||
544 | public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); | 544 | public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); |
545 | 545 | ||
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1185 | } | 1185 | } |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | 1188 | public void TriggerOnScriptChangedEvent(uint localID, uint change, object parameter = null) |
1189 | { | 1189 | { |
1190 | ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent; | 1190 | ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent; |
1191 | if (handlerScriptChangedEvent != null) | 1191 | if (handlerScriptChangedEvent != null) |
@@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1194 | { | 1194 | { |
1195 | try | 1195 | try |
1196 | { | 1196 | { |
1197 | d(localID, change); | 1197 | d(localID, change, parameter); |
1198 | } | 1198 | } |
1199 | catch (Exception e) | 1199 | catch (Exception e) |
1200 | { | 1200 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a23ebbf..23bef74 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4439,10 +4439,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4439 | SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>()); | 4439 | SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>()); |
4440 | } | 4440 | } |
4441 | 4441 | ||
4442 | public void TriggerScriptChangedEvent(Changed val) | 4442 | public void TriggerScriptChangedEvent(Changed val, object data = null) |
4443 | { | 4443 | { |
4444 | if (ParentGroup != null && ParentGroup.Scene != null) | 4444 | if (ParentGroup != null && ParentGroup.Scene != null) |
4445 | ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val); | 4445 | ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val, data); |
4446 | } | 4446 | } |
4447 | 4447 | ||
4448 | public void TrimPermissions() | 4448 | public void TrimPermissions() |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index bc9ab7f..a0f8959 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -816,7 +816,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
816 | m_items.Add(item.ItemID, item); | 816 | m_items.Add(item.ItemID, item); |
817 | m_items.LockItemsForWrite(false); | 817 | m_items.LockItemsForWrite(false); |
818 | if (allowedDrop) | 818 | if (allowedDrop) |
819 | m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); | 819 | m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP, item.ItemID); |
820 | else | 820 | else |
821 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); | 821 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); |
822 | 822 | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index b7fc161..7c2136e 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
215 | det)); | 215 | det)); |
216 | } | 216 | } |
217 | 217 | ||
218 | public void changed(uint localID, uint change) | 218 | public void changed(uint localID, uint change, object parameter) |
219 | { | 219 | { |
220 | // Add to queue for all scripts in localID, Object pass change. | 220 | // Add to queue for all scripts in localID, Object pass change. |
221 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 221 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs b/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs index 5a8b2a3..eb5aeeb 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs | |||
@@ -182,13 +182,26 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
182 | new DetectParams[] { det })); | 182 | new DetectParams[] { det })); |
183 | } | 183 | } |
184 | 184 | ||
185 | public void changed(uint localID, uint change) | 185 | public void changed(uint localID, uint change, object data) |
186 | { | 186 | { |
187 | int ch = (int)change; | 187 | int ch = (int)change; |
188 | // Add to queue for all scripts in localID, Object pass change. | 188 | // Add to queue for all scripts in localID, Object pass change. |
189 | this.PostObjectEvent(localID, new EventParams( | 189 | if(data == null) |
190 | { | ||
191 | PostObjectEvent(localID, new EventParams( | ||
190 | "changed", new object[] { ch }, | 192 | "changed", new object[] { ch }, |
191 | zeroDetectParams)); | 193 | zeroDetectParams)); |
194 | return; | ||
195 | } | ||
196 | if ( data is UUID) | ||
197 | { | ||
198 | DetectParams det = new DetectParams(); | ||
199 | det.Key = (UUID)data; | ||
200 | PostObjectEvent(localID, new EventParams( | ||
201 | "changed", new object[] { ch }, | ||
202 | new DetectParams[] { det })); | ||
203 | return; | ||
204 | } | ||
192 | } | 205 | } |
193 | 206 | ||
194 | // state_entry: not processed here | 207 | // state_entry: not processed here |