Store given items in correct parent folder. Fixes items given to offline avatars
not getting lost.avinationmerge
parent
9c8d7d34b3
commit
4df87631ed
|
@ -414,6 +414,25 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
itemCopy.BasePermissions = item.BasePermissions;
|
||||
}
|
||||
|
||||
if (itemCopy.Folder == UUID.Zero)
|
||||
{
|
||||
InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType);
|
||||
|
||||
if (folder != null)
|
||||
{
|
||||
itemCopy.Folder = folder.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
InventoryFolderBase root = InventoryService.GetRootFolder(recipient);
|
||||
|
||||
if (root != null)
|
||||
itemCopy.Folder = root.ID;
|
||||
else
|
||||
return null; // No destination
|
||||
}
|
||||
}
|
||||
|
||||
itemCopy.GroupID = UUID.Zero;
|
||||
itemCopy.GroupOwned = false;
|
||||
itemCopy.Flags = item.Flags;
|
||||
|
|
Loading…
Reference in New Issue