aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2017-01-16 20:27:39 +0000
committerUbitUmarov2017-01-16 20:27:39 +0000
commit180add745cea4a7e076afd1cfe1c922df1bf7e0b (patch)
treeda9d65ee4918e3cd43acd19c99eb26e3afb764e3 /OpenSim/Region
parent fix EffectiveGroupOrEveryOnePerms C&T == 0 case (diff)
downloadopensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.zip
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.gz
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.bz2
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.xz
replace calls to SetOwnerId and SetRootPartOwner by a single new SetOwner() so owner is not changed twice on rootpart
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs3
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs24
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs3
4 files changed, 27 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 2837358..2a7bfb0 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -136,8 +136,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
136 return false; 136 return false;
137 } 137 }
138 138
139 group.SetOwnerId(remoteClient.AgentId); 139 group.SetOwner(remoteClient.AgentId, remoteClient.ActiveGroupId);
140 group.SetRootPartOwner(part, remoteClient.AgentId, remoteClient.ActiveGroupId);
141 140
142 if (m_scene.Permissions.PropagatePermissions()) 141 if (m_scene.Permissions.PropagatePermissions())
143 { 142 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 2f65ce2..602ac4b 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -2103,8 +2103,7 @@ namespace OpenSim.Region.Framework.Scenes
2103 2103
2104 if (original.OwnerID != AgentID) 2104 if (original.OwnerID != AgentID)
2105 { 2105 {
2106 copy.SetOwnerId(AgentID); 2106 copy.SetOwner(AgentID, GroupID);
2107 copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID);
2108 2107
2109 SceneObjectPart[] partList = copy.Parts; 2108 SceneObjectPart[] partList = copy.Parts;
2110 2109
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4d1e564..924b61f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2766,6 +2766,30 @@ namespace OpenSim.Region.Framework.Scenes
2766 part.ScheduleFullUpdate(); 2766 part.ScheduleFullUpdate();
2767 } 2767 }
2768 2768
2769 public void SetOwner(UUID cAgentID, UUID cGroupID)
2770 {
2771 SceneObjectPart rpart = RootPart;
2772 UUID oldowner = rpart.OwnerID;
2773 ForEachPart(delegate(SceneObjectPart part)
2774 {
2775 if(part.GroupID != part.OwnerID)
2776 part.LastOwnerID = part.OwnerID;
2777 part.OwnerID = cAgentID;
2778 part.GroupID = cGroupID;
2779 });
2780
2781 if (oldowner != cAgentID)
2782 {
2783 // Apply Next Owner Permissions if we're not bypassing permissions
2784 if (!m_scene.Permissions.BypassPermissions())
2785 ApplyNextOwnerPermissions();
2786 }
2787
2788 rpart.ScheduleFullUpdate();
2789 }
2790
2791
2792
2769 /// <summary> 2793 /// <summary>
2770 /// Make a copy of the given part. 2794 /// Make a copy of the given part.
2771 /// </summary> 2795 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index ed27385..1d5e4fb 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -163,8 +163,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
163 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) 163 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
164 return 0; 164 return 0;
165 165
166 hostPart.ParentGroup.SetOwnerId(target.UUID); 166 hostPart.ParentGroup.SetOwner(target.UUID, target.ControllingClient.ActiveGroupId);
167 hostPart.ParentGroup.SetRootPartOwner(hostPart.ParentGroup.RootPart, target.UUID, target.ControllingClient.ActiveGroupId);
168 167
169 if (m_scene.Permissions.PropagatePermissions()) 168 if (m_scene.Permissions.PropagatePermissions())
170 { 169 {