aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2010-05-03 23:44:23 +0200
committerMelanie Thielker2010-05-03 23:44:23 +0200
commit4df87631ede57316fe41ea6c5edcd4996deac625 (patch)
treef2a62749228a269880378b0879df9c77fc3a4683 /OpenSim
parentFix a bug in owner change notification (diff)
downloadopensim-SC_OLD-4df87631ede57316fe41ea6c5edcd4996deac625.zip
opensim-SC_OLD-4df87631ede57316fe41ea6c5edcd4996deac625.tar.gz
opensim-SC_OLD-4df87631ede57316fe41ea6c5edcd4996deac625.tar.bz2
opensim-SC_OLD-4df87631ede57316fe41ea6c5edcd4996deac625.tar.xz
Store given items in correct parent folder. Fixes items given to offline avatars
not getting lost.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index cfcd544..9b838ab 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -414,6 +414,25 @@ namespace OpenSim.Region.Framework.Scenes
414 itemCopy.BasePermissions = item.BasePermissions; 414 itemCopy.BasePermissions = item.BasePermissions;
415 } 415 }
416 416
417 if (itemCopy.Folder == UUID.Zero)
418 {
419 InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType);
420
421 if (folder != null)
422 {
423 itemCopy.Folder = folder.ID;
424 }
425 else
426 {
427 InventoryFolderBase root = InventoryService.GetRootFolder(recipient);
428
429 if (root != null)
430 itemCopy.Folder = root.ID;
431 else
432 return null; // No destination
433 }
434 }
435
417 itemCopy.GroupID = UUID.Zero; 436 itemCopy.GroupID = UUID.Zero;
418 itemCopy.GroupOwned = false; 437 itemCopy.GroupOwned = false;
419 itemCopy.Flags = item.Flags; 438 itemCopy.Flags = item.Flags;