mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Fix scripted give and interactive give to offline avatars. Both folder and
single items are now supported. Magic Boxes, yeah!
This commit is contained in:
@@ -94,6 +94,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void AddInventoryItem(UUID AgentID, InventoryItemBase item)
|
||||
{
|
||||
InventoryFolderBase folder;
|
||||
|
||||
if (item.Folder == UUID.Zero)
|
||||
{
|
||||
folder = InventoryService.GetFolderForType(AgentID, (AssetType)item.AssetType);
|
||||
if (folder == null)
|
||||
{
|
||||
folder = InventoryService.GetRootFolder(AgentID);
|
||||
|
||||
if (folder == null)
|
||||
return;
|
||||
}
|
||||
|
||||
item.Folder = folder.ID;
|
||||
}
|
||||
|
||||
if (InventoryService.AddItem(item))
|
||||
{
|
||||
int userlevel = 0;
|
||||
|
||||
Reference in New Issue
Block a user