From 760010d6fb6aac313d79ce0a4d0016d3809246a0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 22 Mar 2012 22:33:37 +0000
Subject: Fix llGiveInventory() so that it checks the destination part for
AllowInventoryDrop, not the source.
This allows llAllowInventoryDrop() to work.
Regression test added for this case.
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 6ae4adc..d10136f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1210,9 +1210,9 @@ namespace OpenSim.Region.Framework.Scenes
///
/// Copy a task (prim) inventory item to another task (prim)
///
- ///
- ///
- ///
+ /// ID of destination part
+ /// Source part
+ /// Source item id to transfer
public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId)
{
TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId);
@@ -1240,10 +1240,10 @@ namespace OpenSim.Region.Framework.Scenes
// Can't transfer this
//
- if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0))
+ if (part.OwnerID != destPart.OwnerID && (srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
return;
- if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
+ if (part.OwnerID != destPart.OwnerID && (destPart.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
{
// object cannot copy items to an object owned by a different owner
// unless llAllowInventoryDrop has been called
--
cgit v1.1