diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs index 17971e3..31d0034 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs | |||
@@ -130,37 +130,37 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
130 | SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val)); | 130 | SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val)); |
131 | } | 131 | } |
132 | 132 | ||
133 | private int llAttachToAvatarTemp(UUID host, UUID script, int attachmentPoint) | 133 | private void llAttachToAvatarTemp(UUID host, UUID script, int attachmentPoint) |
134 | { | 134 | { |
135 | SceneObjectPart hostPart = m_scene.GetSceneObjectPart(host); | 135 | SceneObjectPart hostPart = m_scene.GetSceneObjectPart(host); |
136 | 136 | ||
137 | if (hostPart == null) | 137 | if (hostPart == null) |
138 | return 0; | 138 | return; |
139 | 139 | ||
140 | if (hostPart.ParentGroup.IsAttachment) | 140 | if (hostPart.ParentGroup.IsAttachment) |
141 | return 0; | 141 | return; |
142 | 142 | ||
143 | IAttachmentsModule attachmentsModule = m_scene.RequestModuleInterface<IAttachmentsModule>(); | 143 | IAttachmentsModule attachmentsModule = m_scene.RequestModuleInterface<IAttachmentsModule>(); |
144 | if (attachmentsModule == null) | 144 | if (attachmentsModule == null) |
145 | return 0; | 145 | return; |
146 | 146 | ||
147 | TaskInventoryItem item = hostPart.Inventory.GetInventoryItem(script); | 147 | TaskInventoryItem item = hostPart.Inventory.GetInventoryItem(script); |
148 | if (item == null) | 148 | if (item == null) |
149 | return 0; | 149 | return; |
150 | 150 | ||
151 | if ((item.PermsMask & 32) == 0) // PERMISSION_ATTACH | 151 | if ((item.PermsMask & 32) == 0) // PERMISSION_ATTACH |
152 | return 0; | 152 | return; |
153 | 153 | ||
154 | ScenePresence target; | 154 | ScenePresence target; |
155 | if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) | 155 | if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) |
156 | return 0; | 156 | return; |
157 | 157 | ||
158 | if (target.UUID != hostPart.ParentGroup.OwnerID) | 158 | if (target.UUID != hostPart.ParentGroup.OwnerID) |
159 | { | 159 | { |
160 | uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); | 160 | uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); |
161 | 161 | ||
162 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) | 162 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) |
163 | return 0; | 163 | return; |
164 | 164 | ||
165 | hostPart.ParentGroup.SetOwnerId(target.UUID); | 165 | hostPart.ParentGroup.SetOwnerId(target.UUID); |
166 | hostPart.ParentGroup.SetRootPartOwner(hostPart.ParentGroup.RootPart, target.UUID, target.ControllingClient.ActiveGroupId); | 166 | hostPart.ParentGroup.SetRootPartOwner(hostPart.ParentGroup.RootPart, target.UUID, target.ControllingClient.ActiveGroupId); |
@@ -183,7 +183,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
183 | hostPart.ParentGroup.RootPart.ScheduleFullUpdate(); | 183 | hostPart.ParentGroup.RootPart.ScheduleFullUpdate(); |
184 | } | 184 | } |
185 | 185 | ||
186 | return attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true, true) ? 1 : 0; | 186 | attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true, true); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | } | 189 | } |