diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f050dcf..46d040f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -375,10 +375,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
375 | } | 375 | } |
376 | part.ParentGroup.DetachToGround(); | 376 | part.ParentGroup.DetachToGround(); |
377 | 377 | ||
378 | List<UUID> uuids = new List<UUID>(); | 378 | // If the item is no-copy we need to delete it from inventory |
379 | uuids.Add(inventoryID); | 379 | InventoryItemBase item = m_scene.InventoryService.GetItem(new InventoryItemBase(itemID)); |
380 | m_scene.InventoryService.DeleteItems(remoteClient.AgentId, uuids); | 380 | if (item != null && (item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
381 | remoteClient.SendRemoveInventoryItem(inventoryID); | 381 | { |
382 | List<UUID> uuids = new List<UUID>(); | ||
383 | uuids.Add(inventoryID); | ||
384 | m_scene.InventoryService.DeleteItems(remoteClient.AgentId, uuids); | ||
385 | remoteClient.SendRemoveInventoryItem(inventoryID); | ||
386 | } | ||
382 | } | 387 | } |
383 | 388 | ||
384 | m_scene.EventManager.TriggerOnAttach(part.ParentGroup.LocalId, itemID, UUID.Zero); | 389 | m_scene.EventManager.TriggerOnAttach(part.ParentGroup.LocalId, itemID, UUID.Zero); |