From 02befc16fecd8da03e71fc8b1138ab97ec48c8ae Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Sun, 19 Oct 2008 00:16:58 +0000 Subject: [PATCH] LIBOMV-397 Corrects InventoryManager behavior when saving attachments to inventory, Thanks Tim Hart for the Patch! git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2303 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse/InventoryManager.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OpenMetaverse/InventoryManager.cs b/OpenMetaverse/InventoryManager.cs index 9f8f08f3..2bb1b7a2 100644 --- a/OpenMetaverse/InventoryManager.cs +++ b/OpenMetaverse/InventoryManager.cs @@ -3156,6 +3156,21 @@ namespace OpenMetaverse item.SalePrice = dataBlock.SalePrice; item.SaleType = (SaleType)dataBlock.SaleType; + /* + * When attaching new objects, an UpdateCreateInventoryItem packet will be + * returned by the server that has a FolderID/ParentUUID of zero. It is up + * to the client to make sure that the item gets a good folder, otherwise + * it will end up inaccesible in inventory. + */ + if (item.ParentUUID == UUID.Zero) + { + // assign default folder for type + item.ParentUUID = FindFolderForType(item.AssetType); + + // send update to the sim + RequestUpdateItem(item); + } + // Update the local copy _Store[item.UUID] = item;