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=5952
0.7.4.1
Justin Clark-Casey (justincc) 2012-05-05 00:29:14 +01:00
parent e18686528e
commit 01b00ad0d5
4 changed files with 30 additions and 15 deletions

View File

@ -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);
}
}

View File

@ -529,7 +529,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
// 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);
// so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
so.DetachFromBackup();

View File

@ -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);
}
}

View File

@ -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);
}
}
}