From 74f0ffbda6bf59d246d4fcc98fa2fa5fc3a06f5c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 29 Apr 2017 02:45:26 +0100 Subject: [PATCH] fix chain of contents sells --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index edf8cb6f00..668766bc48 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1273,11 +1273,16 @@ namespace OpenSim.Region.Framework.Scenes { agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); if (taskItem.InvType == (int)InventoryType.Object) - agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); + { + if((taskItem.CurrentPermissions & (uint)PermissionMask.FoldedMask) != 0) + agentItem.BasePermissions &= + (((taskItem.CurrentPermissions & (uint)PermissionMask.FoldedMask ) << (int)PermissionMask.FoldingShift) | + (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); + } else - agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; + agentItem.BasePermissions &= taskItem.CurrentPermissions; - agentItem.BasePermissions = agentItem.CurrentPermissions; + agentItem.CurrentPermissions = agentItem.BasePermissions; agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner);