diff options
author | Melanie Thielker | 2010-05-04 00:44:05 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-05-04 00:44:05 +0200 |
commit | c86259c6710c8ce5c97a7a64bbb96dac35440aec (patch) | |
tree | 339180630c20ebc1099b0c22bc1fcdc0b780e87d /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Refix the fix (diff) | |
download | opensim-SC_OLD-c86259c6710c8ce5c97a7a64bbb96dac35440aec.zip opensim-SC_OLD-c86259c6710c8ce5c97a7a64bbb96dac35440aec.tar.gz opensim-SC_OLD-c86259c6710c8ce5c97a7a64bbb96dac35440aec.tar.bz2 opensim-SC_OLD-c86259c6710c8ce5c97a7a64bbb96dac35440aec.tar.xz |
Fix scripted give and interactive give to offline avatars. Both folder and
single items are now supported. Magic Boxes, yeah!
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9b838ab..c105560 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -94,6 +94,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
94 | 94 | ||
95 | public void AddInventoryItem(UUID AgentID, InventoryItemBase item) | 95 | public void AddInventoryItem(UUID AgentID, InventoryItemBase item) |
96 | { | 96 | { |
97 | InventoryFolderBase folder; | ||
98 | |||
99 | if (item.Folder == UUID.Zero) | ||
100 | { | ||
101 | folder = InventoryService.GetFolderForType(AgentID, (AssetType)item.AssetType); | ||
102 | if (folder == null) | ||
103 | { | ||
104 | folder = InventoryService.GetRootFolder(AgentID); | ||
105 | |||
106 | if (folder == null) | ||
107 | return; | ||
108 | } | ||
109 | |||
110 | item.Folder = folder.ID; | ||
111 | } | ||
112 | |||
97 | if (InventoryService.AddItem(item)) | 113 | if (InventoryService.AddItem(item)) |
98 | { | 114 | { |
99 | int userlevel = 0; | 115 | int userlevel = 0; |