mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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.
This commit is contained in:
@@ -1210,9 +1210,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <summary>
|
||||
/// Copy a task (prim) inventory item to another task (prim)
|
||||
/// </summary>
|
||||
/// <param name="destId"></param>
|
||||
/// <param name="part"></param>
|
||||
/// <param name="itemId"></param>
|
||||
/// <param name="destId">ID of destination part</param>
|
||||
/// <param name="part">Source part</param>
|
||||
/// <param name="itemId">Source item id to transfer</param>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user