From 3e86064d6bdf46eb3dcbb9e9058cd7226f9e5367 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 1 Sep 2011 23:49:38 +0100 Subject: refactor: factor out DoPostRezWhenFromItem() from IAM.RezObject() --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 9cad003..41f0e8c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -946,6 +946,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // group.Name, group.LocalId, group.UUID, remoteClient.Name); } + DoPostRezWhenFromItem(item, attachment); + + return group; + } + + private void DoPostRezWhenFromItem(InventoryItemBase item, bool isAttachment) + { if (!m_Scene.Permissions.BypassPermissions()) { if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) @@ -953,7 +960,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // If this is done on attachments, no // copy ones will be lost, so avoid it // - if (!attachment) + if (!isAttachment) { List uuids = new List(); uuids.Add(item.ID); @@ -961,8 +968,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } } - - return group; } protected void AddUserData(SceneObjectGroup sog) -- cgit v1.1