From 45301d8a4984b0a6e5e5df4741175ce81729810d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 3 May 2010 01:14:38 +0100 Subject: Defer sending of CHANGED_OWNER to make it work on rezzed objects and attachments in addition to objects sold in place --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 4da63c0..eea73ff 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -955,10 +955,9 @@ namespace OpenSim.Region.Framework.Scenes item.CurrentPermissions &= item.NextPermissions; item.BasePermissions &= item.NextPermissions; item.EveryonePermissions &= item.NextPermissions; + item.OwnerChanged = true; } } - - m_part.TriggerScriptChangedEvent(Changed.OWNER); } public void ApplyGodPermissions(uint perms) @@ -1042,7 +1041,6 @@ namespace OpenSim.Region.Framework.Scenes if (engines == null) return; - lock (m_items) { foreach (TaskInventoryItem item in m_items.Values) @@ -1052,7 +1050,10 @@ namespace OpenSim.Region.Framework.Scenes foreach (IScriptModule engine in engines) { if (engine != null) + { + engine.PostScriptEvent(item.ItemID, "changed", new Object[] { Changed.OWNER }); engine.ResumeScript(item.ItemID); + } } } } -- cgit v1.1