aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index 7011f38..27ba5c9 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -120,6 +120,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
120 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) 120 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target))
121 return; 121 return;
122 122
123 if (target.UUID != hostPart.ParentGroup.OwnerID)
124 {
125 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions();
126
127 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
128 return;
129
130 hostPart.ParentGroup.SetOwnerId(target.UUID);
131 hostPart.ParentGroup.SetRootPartOwner(hostPart.ParentGroup.RootPart, target.UUID, target.ControllingClient.ActiveGroupId);
132
133 if (m_scene.Permissions.PropagatePermissions())
134 {
135 foreach (SceneObjectPart child in hostPart.ParentGroup.Parts)
136 {
137 child.Inventory.ChangeInventoryOwner(target.UUID);
138 child.TriggerScriptChangedEvent(Changed.OWNER);
139 child.ApplyNextOwnerPermissions();
140 }
141 }
142
143 hostPart.ParentGroup.RootPart.ObjectSaleType = 0;
144 hostPart.ParentGroup.RootPart.SalePrice = 10;
145
146 hostPart.ParentGroup.HasGroupChanged = true;
147 hostPart.ParentGroup.RootPart.SendPropertiesToClient(target.ControllingClient);
148 hostPart.ParentGroup.RootPart.ScheduleFullUpdate();
149 }
150
123 attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true); 151 attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true);
124 } 152 }
125 } 153 }