diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index f76f8828d0..edc8886fbf 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Framework.Scenes
///
///
public event ScriptChangedEvent OnScriptChangedEvent;
- public delegate void ScriptChangedEvent(uint localID, uint change);
+ public delegate void ScriptChangedEvent(uint localID, uint change, object data);
public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed);
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- public void TriggerOnScriptChangedEvent(uint localID, uint change)
+ public void TriggerOnScriptChangedEvent(uint localID, uint change, object parameter = null)
{
ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent;
if (handlerScriptChangedEvent != null)
@@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes
{
try
{
- d(localID, change);
+ d(localID, change, parameter);
}
catch (Exception e)
{
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a23ebbfa46..23bef74704 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4439,10 +4439,10 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary());
}
- public void TriggerScriptChangedEvent(Changed val)
+ public void TriggerScriptChangedEvent(Changed val, object data = null)
{
if (ParentGroup != null && ParentGroup.Scene != null)
- ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
+ ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val, data);
}
public void TrimPermissions()
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index bc9ab7f3a0..a0f895933f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -816,7 +816,7 @@ namespace OpenSim.Region.Framework.Scenes
m_items.Add(item.ItemID, item);
m_items.LockItemsForWrite(false);
if (allowedDrop)
- m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
+ m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP, item.ItemID);
else
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index b7fc161e61..7c2136edd6 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
det));
}
- public void changed(uint localID, uint change)
+ public void changed(uint localID, uint change, object parameter)
{
// Add to queue for all scripts in localID, Object pass change.
myScriptEngine.PostObjectEvent(localID, new EventParams(
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs b/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs
index 5a8b2a39aa..eb5aeeb86d 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMREvents.cs
@@ -182,13 +182,26 @@ namespace OpenSim.Region.ScriptEngine.Yengine
new DetectParams[] { det }));
}
- public void changed(uint localID, uint change)
+ public void changed(uint localID, uint change, object data)
{
int ch = (int)change;
// Add to queue for all scripts in localID, Object pass change.
- this.PostObjectEvent(localID, new EventParams(
+ if(data == null)
+ {
+ PostObjectEvent(localID, new EventParams(
"changed", new object[] { ch },
zeroDetectParams));
+ return;
+ }
+ if ( data is UUID)
+ {
+ DetectParams det = new DetectParams();
+ det.Key = (UUID)data;
+ PostObjectEvent(localID, new EventParams(
+ "changed", new object[] { ch },
+ new DetectParams[] { det }));
+ return;
+ }
}
// state_entry: not processed here