diff options
author | Diva Canto | 2010-06-09 11:24:37 -0700 |
---|---|---|
committer | Diva Canto | 2010-06-09 11:24:37 -0700 |
commit | 18bfe58de8208c369c0eb7b22680c51c37c2fe6c (patch) | |
tree | 3231196ea963854e05006f97077e8f8c98e1ea82 | |
parent | Bug fix in attachments: when attaching from inworld the item's parentFolderID... (diff) | |
download | opensim-SC-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.zip opensim-SC-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.gz opensim-SC-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.bz2 opensim-SC-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.xz |
Bug fix on attachments: don't delete the item from inventory when it's dropped on the ground.
-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); |