diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 42e3359..9ccf5a0 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -196,13 +196,24 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
196 | // currently calls this with multiple items. | 196 | // currently calls this with multiple items. |
197 | UUID ret = UUID.Zero; | 197 | UUID ret = UUID.Zero; |
198 | 198 | ||
199 | Dictionary<UUID, List<SceneObjectGroup>> deletes = | ||
200 | new Dictionary<UUID, List<SceneObjectGroup>>(); | ||
201 | |||
199 | foreach (SceneObjectGroup g in objectGroups) | 202 | foreach (SceneObjectGroup g in objectGroups) |
200 | ret = DeleteToInventory(action, folderID, g, remoteClient); | 203 | { |
204 | if (!deletes.ContainsKey(g.OwnerID)) | ||
205 | deletes[g.OwnerID] = new List<SceneObjectGroup>(); | ||
206 | |||
207 | deletes[g.OwnerID].Add(g); | ||
208 | } | ||
209 | |||
210 | foreach (List<SceneObjectGroup> objlist in deletes.Values) | ||
211 | ret = DeleteToInventory(action, folderID, objlist, remoteClient); | ||
201 | 212 | ||
202 | return ret; | 213 | return ret; |
203 | } | 214 | } |
204 | 215 | ||
205 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, | 216 | private UUID DeleteToInventory(DeRezAction action, UUID folderID, |
206 | SceneObjectGroup objectGroup, IClientAPI remoteClient) | 217 | SceneObjectGroup objectGroup, IClientAPI remoteClient) |
207 | { | 218 | { |
208 | UUID assetID = UUID.Zero; | 219 | UUID assetID = UUID.Zero; |
@@ -320,10 +331,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
320 | } | 331 | } |
321 | else | 332 | else |
322 | { | 333 | { |
323 | // Catch all. Use lost & found | 334 | if (remoteClient == null || |
324 | // | 335 | objectGroup.OwnerID != remoteClient.AgentId) |
336 | { | ||
337 | // Taking copy of another person's item. Take to | ||
338 | // Objects folder. | ||
339 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object); | ||
340 | } | ||
341 | else | ||
342 | { | ||
343 | // Catch all. Use lost & found | ||
344 | // | ||
325 | 345 | ||
326 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); | 346 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); |
347 | } | ||
327 | } | 348 | } |
328 | } | 349 | } |
329 | 350 | ||