Make taken items go back to the folder they came from

avinationmerge
Melanie Thielker 2010-07-10 10:51:49 +02:00
parent 05b35eb57c
commit 8aa5f30082
2 changed files with 17 additions and 0 deletions

View File

@ -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 if (folder == null) // None of the above
{ {
folder = new InventoryFolderBase(folderID); folder = new InventoryFolderBase(folderID);
@ -485,6 +497,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
SceneObjectGroup group SceneObjectGroup group
= SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData);
group.RootPart.FromFolderID = item.Folder;
if (!m_Scene.Permissions.CanRezObject( if (!m_Scene.Permissions.CanRezObject(
group.Children.Count, remoteClient.AgentId, pos) group.Children.Count, remoteClient.AgentId, pos)
&& !attachment) && !attachment)

View File

@ -179,6 +179,9 @@ namespace OpenSim.Region.Framework.Scenes
[XmlIgnore] [XmlIgnore]
public UUID FromItemID; public UUID FromItemID;
[XmlIgnore]
public UUID FromFolderID;
[XmlIgnore] [XmlIgnore]
public int STATUS_ROTATE_X; public int STATUS_ROTATE_X;