diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 26 |
2 files changed, 39 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 283a0cf..71570da 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -253,6 +253,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
253 | return newAssetID; | 253 | return newAssetID; |
254 | } | 254 | } |
255 | 255 | ||
256 | /// | ||
257 | /// UpdateInventoryItemAsset | ||
258 | /// | ||
259 | public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) | ||
260 | { | ||
261 | if (base.UpdateInventoryItemAsset(ownerID, item, asset)) | ||
262 | { | ||
263 | UploadInventoryItem(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0); | ||
264 | return true; | ||
265 | } | ||
266 | |||
267 | return false; | ||
268 | } | ||
269 | |||
256 | /// | 270 | /// |
257 | /// Used in DeleteToInventory | 271 | /// Used in DeleteToInventory |
258 | /// | 272 | /// |
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) |