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.cs30
1 files changed, 28 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 58de44e..fff39fb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -330,6 +330,12 @@ namespace OpenSim.Region.Framework.Scenes
330 item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); 330 item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255);
331 item.Name = itemUpd.Name; 331 item.Name = itemUpd.Name;
332 item.Description = itemUpd.Description; 332 item.Description = itemUpd.Description;
333
334// m_log.DebugFormat(
335// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}",
336// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags,
337// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions);
338
333 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) 339 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions))
334 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; 340 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
335 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; 341 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
@@ -338,6 +344,9 @@ namespace OpenSim.Region.Framework.Scenes
338 item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; 344 item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions;
339 if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) 345 if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions))
340 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; 346 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup;
347
348// m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags);
349
341 item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; 350 item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions;
342 item.GroupID = itemUpd.GroupID; 351 item.GroupID = itemUpd.GroupID;
343 item.GroupOwned = itemUpd.GroupOwned; 352 item.GroupOwned = itemUpd.GroupOwned;
@@ -2310,8 +2319,25 @@ namespace OpenSim.Region.Framework.Scenes
2310 m_sceneGraph.DelinkObjects(parts); 2319 m_sceneGraph.DelinkObjects(parts);
2311 } 2320 }
2312 2321
2322 /// <summary>
2323 /// Link the scene objects containing the indicated parts to a root object.
2324 /// </summary>
2325 /// <param name="client"></param>
2326 /// <param name="parentPrimId">A root prim id of the object which will be the root prim of the resulting linkset.</param>
2327 /// <param name="childPrimIds">A list of child prims for the objects that should be linked in.</param>
2313 public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) 2328 public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds)
2314 { 2329 {
2330 LinkObjects(client.AgentId, parentPrimId, childPrimIds);
2331 }
2332
2333 /// <summary>
2334 /// Link the scene objects containing the indicated parts to a root object.
2335 /// </summary>
2336 /// <param name="agentId">The ID of the user linking.</param>
2337 /// <param name="parentPrimId">A root prim id of the object which will be the root prim of the resulting linkset.</param>
2338 /// <param name="childPrimIds">A list of child prims for the objects that should be linked in.</param>
2339 public void LinkObjects(UUID agentId, uint parentPrimId, List<uint> childPrimIds)
2340 {
2315 List<UUID> owners = new List<UUID>(); 2341 List<UUID> owners = new List<UUID>();
2316 2342
2317 List<SceneObjectPart> children = new List<SceneObjectPart>(); 2343 List<SceneObjectPart> children = new List<SceneObjectPart>();
@@ -2323,7 +2349,7 @@ namespace OpenSim.Region.Framework.Scenes
2323 return; 2349 return;
2324 } 2350 }
2325 2351
2326 if (!Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) 2352 if (!Permissions.CanLinkObject(agentId, root.ParentGroup.RootPart.UUID))
2327 { 2353 {
2328 m_log.DebugFormat("[LINK]: Refusing link. No permissions on root prim"); 2354 m_log.DebugFormat("[LINK]: Refusing link. No permissions on root prim");
2329 return; 2355 return;
@@ -2339,7 +2365,7 @@ namespace OpenSim.Region.Framework.Scenes
2339 if (!owners.Contains(part.OwnerID)) 2365 if (!owners.Contains(part.OwnerID))
2340 owners.Add(part.OwnerID); 2366 owners.Add(part.OwnerID);
2341 2367
2342 if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) 2368 if (Permissions.CanLinkObject(agentId, part.ParentGroup.RootPart.UUID))
2343 children.Add(part); 2369 children.Add(part);
2344 } 2370 }
2345 2371