diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index a116f0f..6e48fcc 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -292,7 +292,31 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
292 | 292 | ||
293 | return UUID.Zero; | 293 | return UUID.Zero; |
294 | } | 294 | } |
295 | 295 | ||
296 | public virtual bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) | ||
297 | { | ||
298 | if (item != null && item.Owner == ownerID && asset != null) | ||
299 | { | ||
300 | item.AssetID = asset.FullID; | ||
301 | item.Description = asset.Description; | ||
302 | item.Name = asset.Name; | ||
303 | item.AssetType = asset.Type; | ||
304 | item.InvType = (int)InventoryType.Object; | ||
305 | |||
306 | m_Scene.AssetService.Store(asset); | ||
307 | m_Scene.InventoryService.UpdateItem(item); | ||
308 | |||
309 | return true; | ||
310 | } | ||
311 | else | ||
312 | { | ||
313 | m_log.ErrorFormat("[INVENTORY ACCESS MODULE]: Given invalid item for inventory update: {0}", | ||
314 | (item == null || asset == null? "null item or asset" : "wrong owner")); | ||
315 | return false; | ||
316 | } | ||
317 | |||
318 | } | ||
319 | |||
296 | public virtual List<InventoryItemBase> CopyToInventory( | 320 | public virtual List<InventoryItemBase> CopyToInventory( |
297 | DeRezAction action, UUID folderID, | 321 | DeRezAction action, UUID folderID, |
298 | List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, bool asAttachment) | 322 | List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, bool asAttachment) |