diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 50 |
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 15b5230..6ebfd31 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1941,5 +1941,55 @@ namespace OpenSim.Region.Framework.Scenes | |||
1941 | part.GetProperties(remoteClient); | 1941 | part.GetProperties(remoteClient); |
1942 | } | 1942 | } |
1943 | } | 1943 | } |
1944 | |||
1945 | public void DelinkObjects(List<uint> primIds, IClientAPI client) | ||
1946 | { | ||
1947 | List<SceneObjectPart> parts = new List<SceneObjectPart>(); | ||
1948 | |||
1949 | foreach (uint localID in primIds) | ||
1950 | { | ||
1951 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1952 | |||
1953 | if (part == null) | ||
1954 | continue; | ||
1955 | |||
1956 | if (Permissions.CanDelinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
1957 | parts.Add(part); | ||
1958 | } | ||
1959 | |||
1960 | m_sceneGraph.DelinkObjects(parts); | ||
1961 | } | ||
1962 | |||
1963 | public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) | ||
1964 | { | ||
1965 | List<UUID> owners = new List<UUID>(); | ||
1966 | |||
1967 | List<SceneObjectPart> children = new List<SceneObjectPart>(); | ||
1968 | SceneObjectPart root = GetSceneObjectPart(parentPrimId); | ||
1969 | |||
1970 | if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) | ||
1971 | return; | ||
1972 | |||
1973 | foreach (uint localID in childPrimIds) | ||
1974 | { | ||
1975 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1976 | |||
1977 | if (part == null) | ||
1978 | continue; | ||
1979 | |||
1980 | if (!owners.Contains(part.OwnerID)) | ||
1981 | owners.Add(part.OwnerID); | ||
1982 | |||
1983 | if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
1984 | children.Add(part); | ||
1985 | } | ||
1986 | |||
1987 | // Must be all one owner | ||
1988 | // | ||
1989 | if (owners.Count > 1) | ||
1990 | return; | ||
1991 | |||
1992 | m_sceneGraph.LinkObjects(root, children); | ||
1993 | } | ||
1944 | } | 1994 | } |
1945 | } | 1995 | } |