aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 79b3cfd..2aad4f0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -271,8 +271,7 @@ namespace OpenSim.Region.Framework.Scenes
271 { 271 {
272 // Needs to determine which engine was running it and use that 272 // Needs to determine which engine was running it and use that
273 // 273 //
274 part.Inventory.CreateScriptInstance(item.ItemID, 0, false, DefaultScriptEngine, 0); 274 errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0);
275 errors = part.Inventory.GetScriptErrors(item.ItemID);
276 } 275 }
277 else 276 else
278 { 277 {
@@ -850,8 +849,12 @@ namespace OpenSim.Region.Framework.Scenes
850 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) 849 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
851 { 850 {
852 SceneObjectPart part = GetSceneObjectPart(localID); 851 SceneObjectPart part = GetSceneObjectPart(localID);
853 SceneObjectGroup group = part.ParentGroup; 852 SceneObjectGroup group = null;
854 if (group != null) 853 if (part != null)
854 {
855 group = part.ParentGroup;
856 }
857 if (part != null && group != null)
855 { 858 {
856 TaskInventoryItem item = group.GetInventoryItem(localID, itemID); 859 TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
857 if (item == null) 860 if (item == null)
@@ -1579,9 +1582,10 @@ namespace OpenSim.Region.Framework.Scenes
1579 if (remoteClient != null) 1582 if (remoteClient != null)
1580 { 1583 {
1581 permissionToTake = 1584 permissionToTake =
1582 Permissions.CanReturnObject( 1585 Permissions.CanReturnObjects(
1583 grp.UUID, 1586 null,
1584 remoteClient.AgentId); 1587 remoteClient.AgentId,
1588 new List<SceneObjectGroup>() {grp});
1585 permissionToDelete = permissionToTake; 1589 permissionToDelete = permissionToTake;
1586 1590
1587 if (permissionToDelete) 1591 if (permissionToDelete)
@@ -1806,8 +1810,13 @@ namespace OpenSim.Region.Framework.Scenes
1806 } 1810 }
1807 else 1811 else
1808 { 1812 {
1809 item.BasePermissions = objectGroup.GetEffectivePermissions(); 1813 uint ownerPerms = objectGroup.GetEffectivePermissions();
1810 item.CurrentPermissions = objectGroup.GetEffectivePermissions(); 1814 if ((objectGroup.RootPart.OwnerMask & (uint)PermissionMask.Modify) != 0)
1815 ownerPerms |= (uint)PermissionMask.Modify;
1816
1817 item.BasePermissions = ownerPerms;
1818 item.CurrentPermissions = ownerPerms;
1819
1811 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1820 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1812 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; 1821 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
1813 item.GroupPermissions = objectGroup.RootPart.GroupMask; 1822 item.GroupPermissions = objectGroup.RootPart.GroupMask;