let changed allowed drop have lldetectedkey[0] return the dropped item id, Yengine and still testing"
parent
b7507b70bc
commit
ece3843798
|
@ -539,7 +539,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/>
|
/// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptChangedEvent OnScriptChangedEvent;
|
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);
|
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;
|
ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent;
|
||||||
if (handlerScriptChangedEvent != null)
|
if (handlerScriptChangedEvent != null)
|
||||||
|
@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d(localID, change);
|
d(localID, change, parameter);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4439,10 +4439,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>());
|
SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerScriptChangedEvent(Changed val)
|
public void TriggerScriptChangedEvent(Changed val, object data = null)
|
||||||
{
|
{
|
||||||
if (ParentGroup != null && ParentGroup.Scene != 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()
|
public void TrimPermissions()
|
||||||
|
|
|
@ -816,7 +816,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_items.Add(item.ItemID, item);
|
m_items.Add(item.ItemID, item);
|
||||||
m_items.LockItemsForWrite(false);
|
m_items.LockItemsForWrite(false);
|
||||||
if (allowedDrop)
|
if (allowedDrop)
|
||||||
m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
|
m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP, item.ItemID);
|
||||||
else
|
else
|
||||||
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
|
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
det));
|
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.
|
// Add to queue for all scripts in localID, Object pass change.
|
||||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||||
|
|
|
@ -182,13 +182,26 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||||
new DetectParams[] { det }));
|
new DetectParams[] { det }));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changed(uint localID, uint change)
|
public void changed(uint localID, uint change, object data)
|
||||||
{
|
{
|
||||||
int ch = (int)change;
|
int ch = (int)change;
|
||||||
// Add to queue for all scripts in localID, Object pass 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 },
|
"changed", new object[] { ch },
|
||||||
zeroDetectParams));
|
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
|
// state_entry: not processed here
|
||||||
|
|
Loading…
Reference in New Issue