Fire the scripting changed event with CHANGED_OWNER when an object that has changed owners is rezzed.
This needs to occur after the script is resumed rather than before, when the event is just dropped. Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=59520.7.4.1
parent
e18686528e
commit
01b00ad0d5
|
@ -26,6 +26,8 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
|
@ -35,6 +37,8 @@ namespace OpenSim.Framework
|
|||
/// </summary>
|
||||
public class TaskInventoryItem : ICloneable
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// XXX This should really be factored out into some constants class.
|
||||
/// </summary>
|
||||
|
@ -331,12 +335,18 @@ namespace OpenSim.Framework
|
|||
}
|
||||
}
|
||||
|
||||
public bool OwnerChanged {
|
||||
get {
|
||||
public bool OwnerChanged
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ownerChanged;
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
_ownerChanged = value;
|
||||
// m_log.DebugFormat(
|
||||
// "[TASK INVENTORY ITEM]: Owner changed set {0} for {1} {2} owned by {3}",
|
||||
// _ownerChanged, Name, ItemID, OwnerID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -527,9 +527,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
private void AttachToAgent(
|
||||
IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
|
||||
// so.Name, avatar.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
|
||||
// so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
|
||||
|
||||
so.DetachFromBackup();
|
||||
|
||||
|
@ -788,9 +788,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
/// <param name="att"></param>
|
||||
private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||
// att.Name, sp.Name, AttachmentPt, itemID);
|
||||
// m_log.DebugFormat(
|
||||
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||
// att.Name, sp.Name, AttachmentPt, itemID);
|
||||
|
||||
if (UUID.Zero == itemID)
|
||||
{
|
||||
|
@ -853,9 +853,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
|
||||
private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
|
||||
// objectLocalID, remoteClient.Name, AttachmentPt, silent);
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
|
||||
// objectLocalID, remoteClient.Name, AttachmentPt, silent);
|
||||
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
|
|
@ -126,7 +126,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// m_log.DebugFormat(
|
||||
// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
|
||||
// obj.Name, m_Scene.RegionInfo.RegionName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1219,10 +1219,16 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (engine != null)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[PRIM INVENTORY]: Resuming script {0} {1} for {2}, OwnerChanged {3}",
|
||||
// item.Name, item.ItemID, item.OwnerID, item.OwnerChanged);
|
||||
|
||||
engine.ResumeScript(item.ItemID);
|
||||
|
||||
if (item.OwnerChanged)
|
||||
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER });
|
||||
|
||||
item.OwnerChanged = false;
|
||||
engine.ResumeScript(item.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue