From 1169bfeaf38ea6b1f6ecaf2d634e130ad891874c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 10 Jul 2010 10:51:49 +0200 Subject: Make taken items go back to the folder they came from --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 14 ++++++++++++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 +++ 2 files changed, 17 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 90b7b51..2057c65 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -322,6 +322,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } + // Override and put into where it came from, if it came + // from anywhere in inventory + // + if (action == DeRezAction.Take || action == DeRezAction.TakeCopy) + { + if (objectGroup.RootPart.FromFolderID != UUID.Zero) + { + InventoryFolderBase f = new InventoryFolderBase(objectGroup.RootPart.FromFolderID, userID); + folder = m_Scene.InventoryService.GetFolder(f); + } + } + if (folder == null) // None of the above { folder = new InventoryFolderBase(folderID); @@ -485,6 +497,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess SceneObjectGroup group = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); + group.RootPart.FromFolderID = item.Folder; + if (!m_Scene.Permissions.CanRezObject( group.Children.Count, remoteClient.AgentId, pos) && !attachment) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 59fd805..0698411 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -180,6 +180,9 @@ namespace OpenSim.Region.Framework.Scenes public UUID FromItemID; [XmlIgnore] + public UUID FromFolderID; + + [XmlIgnore] public int STATUS_ROTATE_X; [XmlIgnore] -- cgit v1.1