diff options
author | Melanie Thielker | 2010-07-10 10:51:49 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-07-10 10:51:49 +0200 |
commit | 8aa5f30082f667fc23ccfdb839e04ba8b72f872c (patch) | |
tree | d55723f832c0f7cc5d73edfdf1395461f384f2bf /OpenSim/Region/CoreModules | |
parent | Correct a merge artefact (diff) | |
download | opensim-SC_OLD-8aa5f30082f667fc23ccfdb839e04ba8b72f872c.zip opensim-SC_OLD-8aa5f30082f667fc23ccfdb839e04ba8b72f872c.tar.gz opensim-SC_OLD-8aa5f30082f667fc23ccfdb839e04ba8b72f872c.tar.bz2 opensim-SC_OLD-8aa5f30082f667fc23ccfdb839e04ba8b72f872c.tar.xz |
Make taken items go back to the folder they came from
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 14 |
1 files changed, 14 insertions, 0 deletions
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 | |||
322 | } | 322 | } |
323 | } | 323 | } |
324 | 324 | ||
325 | // Override and put into where it came from, if it came | ||
326 | // from anywhere in inventory | ||
327 | // | ||
328 | if (action == DeRezAction.Take || action == DeRezAction.TakeCopy) | ||
329 | { | ||
330 | if (objectGroup.RootPart.FromFolderID != UUID.Zero) | ||
331 | { | ||
332 | InventoryFolderBase f = new InventoryFolderBase(objectGroup.RootPart.FromFolderID, userID); | ||
333 | folder = m_Scene.InventoryService.GetFolder(f); | ||
334 | } | ||
335 | } | ||
336 | |||
325 | if (folder == null) // None of the above | 337 | if (folder == null) // None of the above |
326 | { | 338 | { |
327 | folder = new InventoryFolderBase(folderID); | 339 | folder = new InventoryFolderBase(folderID); |
@@ -485,6 +497,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
485 | SceneObjectGroup group | 497 | SceneObjectGroup group |
486 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); | 498 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); |
487 | 499 | ||
500 | group.RootPart.FromFolderID = item.Folder; | ||
501 | |||
488 | if (!m_Scene.Permissions.CanRezObject( | 502 | if (!m_Scene.Permissions.CanRezObject( |
489 | group.Children.Count, remoteClient.AgentId, pos) | 503 | group.Children.Count, remoteClient.AgentId, pos) |
490 | && !attachment) | 504 | && !attachment) |