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 5b21332..6c57d18 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 {
@@ -849,8 +848,12 @@ namespace OpenSim.Region.Framework.Scenes
849 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) 848 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
850 { 849 {
851 SceneObjectPart part = GetSceneObjectPart(localID); 850 SceneObjectPart part = GetSceneObjectPart(localID);
852 SceneObjectGroup group = part.ParentGroup; 851 SceneObjectGroup group = null;
853 if (group != null) 852 if (part != null)
853 {
854 group = part.ParentGroup;
855 }
856 if (part != null && group != null)
854 { 857 {
855 TaskInventoryItem item = group.GetInventoryItem(localID, itemID); 858 TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
856 if (item == null) 859 if (item == null)
@@ -1577,9 +1580,10 @@ namespace OpenSim.Region.Framework.Scenes
1577 if (remoteClient != null) 1580 if (remoteClient != null)
1578 { 1581 {
1579 permissionToTake = 1582 permissionToTake =
1580 Permissions.CanReturnObject( 1583 Permissions.CanReturnObjects(
1581 grp.UUID, 1584 null,
1582 remoteClient.AgentId); 1585 remoteClient.AgentId,
1586 new List<SceneObjectGroup>() {grp});
1583 permissionToDelete = permissionToTake; 1587 permissionToDelete = permissionToTake;
1584 1588
1585 if (permissionToDelete) 1589 if (permissionToDelete)
@@ -1804,8 +1808,13 @@ namespace OpenSim.Region.Framework.Scenes
1804 } 1808 }
1805 else 1809 else
1806 { 1810 {
1807 item.BasePermissions = objectGroup.GetEffectivePermissions(); 1811 uint ownerPerms = objectGroup.GetEffectivePermissions();
1808 item.CurrentPermissions = objectGroup.GetEffectivePermissions(); 1812 if ((objectGroup.RootPart.OwnerMask & (uint)PermissionMask.Modify) != 0)
1813 ownerPerms |= (uint)PermissionMask.Modify;
1814
1815 item.BasePermissions = ownerPerms;
1816 item.CurrentPermissions = ownerPerms;
1817
1809 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1818 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1810 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; 1819 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
1811 item.GroupPermissions = objectGroup.RootPart.GroupMask; 1820 item.GroupPermissions = objectGroup.RootPart.GroupMask;