diff options
author | Melanie | 2012-08-14 13:40:13 +0100 |
---|---|---|
committer | Melanie | 2012-08-14 13:40:13 +0100 |
commit | a5b6492223ae0dfeb12d768c12e6347e93225d14 (patch) | |
tree | 707bad77bda50c73d1cbbebf6153ab12d7238e03 /OpenSim | |
parent | Move inititalization to RegionLoaded to avoid a module loading order issue (diff) | |
download | opensim-SC-a5b6492223ae0dfeb12d768c12e6347e93225d14.zip opensim-SC-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.gz opensim-SC-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.bz2 opensim-SC-a5b6492223ae0dfeb12d768c12e6347e93225d14.tar.xz |
Perform ownership transfer and permission propagation as well as needed
updates on the new temp attachment.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs | 28 |
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 | } |