refactor: simplify code for checks when part.OwnerID != destPart.OwnerID in MoveTaskInventoryItem()
parent
760010d6fb
commit
5bf45b9b98
|
@ -1238,24 +1238,21 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
}
|
||||
|
||||
// Can't transfer this
|
||||
//
|
||||
if (part.OwnerID != destPart.OwnerID && (srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
|
||||
if (part.OwnerID != destPart.OwnerID)
|
||||
{
|
||||
// Source must have transfer permissions
|
||||
if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
|
||||
return;
|
||||
|
||||
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
|
||||
|
||||
// Object cannot copy items to an object owned by a different owner
|
||||
// unless llAllowInventoryDrop has been called on the destination
|
||||
if ((destPart.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
// must have both move and modify permission to put an item in an object
|
||||
if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TaskInventoryItem destTaskItem = new TaskInventoryItem();
|
||||
|
||||
|
|
Loading…
Reference in New Issue