aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar
diff options
context:
space:
mode:
authorMelanie2012-08-14 13:40:13 +0100
committerMelanie2012-08-14 13:40:13 +0100
commita5b6492223ae0dfeb12d768c12e6347e93225d14 (patch)
tree707bad77bda50c73d1cbbebf6153ab12d7238e03 /OpenSim/Region/OptionalModules/Avatar
parentMove inititalization to RegionLoaded to avoid a module loading order issue (diff)
downloadopensim-SC_OLD-a5b6492223ae0dfeb12d768c12e6347e93225d14.zip
opensim-SC_OLD-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.gz
opensim-SC_OLD-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.bz2
opensim-SC_OLD-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.xz
Perform ownership transfer and permission propagation as well as needed
updates on the new temp attachment.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-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 }