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.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 5b21332..8716e0a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2568,5 +2568,55 @@ namespace OpenSim.Region.Framework.Scenes
2568 part.GetProperties(remoteClient); 2568 part.GetProperties(remoteClient);
2569 } 2569 }
2570 } 2570 }
2571
2572 public void DelinkObjects(List<uint> primIds, IClientAPI client)
2573 {
2574 List<SceneObjectPart> parts = new List<SceneObjectPart>();
2575
2576 foreach (uint localID in primIds)
2577 {
2578 SceneObjectPart part = GetSceneObjectPart(localID);
2579
2580 if (part == null)
2581 continue;
2582
2583 if (Permissions.CanDelinkObject(client.AgentId, part.ParentGroup.RootPart.UUID))
2584 parts.Add(part);
2585 }
2586
2587 m_sceneGraph.DelinkObjects(parts);
2588 }
2589
2590 public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds)
2591 {
2592 List<UUID> owners = new List<UUID>();
2593
2594 List<SceneObjectPart> children = new List<SceneObjectPart>();
2595 SceneObjectPart root = GetSceneObjectPart(parentPrimId);
2596
2597 if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID))
2598 return;
2599
2600 foreach (uint localID in childPrimIds)
2601 {
2602 SceneObjectPart part = GetSceneObjectPart(localID);
2603
2604 if (part == null)
2605 continue;
2606
2607 if (!owners.Contains(part.OwnerID))
2608 owners.Add(part.OwnerID);
2609
2610 if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID))
2611 children.Add(part);
2612 }
2613
2614 // Must be all one owner
2615 //
2616 if (owners.Count > 1)
2617 return;
2618
2619 m_sceneGraph.LinkObjects(root, children);
2620 }
2571 } 2621 }
2572} 2622}