diff options
author | Justin Clark-Casey (justincc) | 2010-09-04 01:36:26 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-09-04 01:36:26 +0100 |
commit | 1e8e98a07fdad6cff4be780083b3d9ad2360b8e7 (patch) | |
tree | 525953a28c694123fc1450e882dca65aa620e124 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |
parent | Create Scene.Inventory.cs.AddInventoryItem(InventoryItemBase item) (diff) | |
download | opensim-SC_OLD-1e8e98a07fdad6cff4be780083b3d9ad2360b8e7.zip opensim-SC_OLD-1e8e98a07fdad6cff4be780083b3d9ad2360b8e7.tar.gz opensim-SC_OLD-1e8e98a07fdad6cff4be780083b3d9ad2360b8e7.tar.bz2 opensim-SC_OLD-1e8e98a07fdad6cff4be780083b3d9ad2360b8e7.tar.xz |
Move code that allows llGiveInvetory() to move item into appropriate system folder up from connectors into Scene.Inventory.cs
This fixes the problem for all architectures (hg as well as local and grid) and means we don't have to dupe code between connectors.
Not ideal in that it becomes non-modular, but methods in Scene.Inventory.cs should eventually be modularized anyway.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 06b40b3..cbd9e05 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -221,34 +221,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
221 | // m_log.DebugFormat( | 221 | // m_log.DebugFormat( |
222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", | 222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", |
223 | // item.Name, item.Owner, item.Folder); | 223 | // item.Name, item.Owner, item.Folder); |
224 | |||
225 | if (UUID.Zero == item.Folder) | ||
226 | { | ||
227 | InventoryFolderBase f = m_InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType); | ||
228 | if (f != null) | ||
229 | { | ||
230 | // m_log.DebugFormat( | ||
231 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Found folder {0} type {1} for item {2}", | ||
232 | // f.Name, (AssetType)f.Type, item.Name); | ||
233 | |||
234 | item.Folder = f.ID; | ||
235 | } | ||
236 | else | ||
237 | { | ||
238 | f = m_InventoryService.GetRootFolder(item.Owner); | ||
239 | if (f != null) | ||
240 | { | ||
241 | item.Folder = f.ID; | ||
242 | } | ||
243 | else | ||
244 | { | ||
245 | m_log.WarnFormat( | ||
246 | "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find root folder for {0} when trying to add item {1} with no parent folder specified", | ||
247 | item.Owner, item.Name); | ||
248 | return false; | ||
249 | } | ||
250 | } | ||
251 | } | ||
252 | 224 | ||
253 | return m_InventoryService.AddItem(item); | 225 | return m_InventoryService.AddItem(item); |
254 | } | 226 | } |