aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-06-09 11:24:37 -0700
committerDiva Canto2010-06-09 11:24:37 -0700
commit18bfe58de8208c369c0eb7b22680c51c37c2fe6c (patch)
tree3231196ea963854e05006f97077e8f8c98e1ea82 /OpenSim/Region
parentBug fix in attachments: when attaching from inworld the item's parentFolderID... (diff)
downloadopensim-SC_OLD-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.zip
opensim-SC_OLD-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.gz
opensim-SC_OLD-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.bz2
opensim-SC_OLD-18bfe58de8208c369c0eb7b22680c51c37c2fe6c.tar.xz
Bug fix on attachments: don't delete the item from inventory when it's dropped on the ground.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs13
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);