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
This commit is contained in:
Jim Radford
2008-10-19 00:16:58 +00:00
parent 21abeaec88
commit 02befc16fe

View File

@@ -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;