diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Transfer')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index f3af59a..91eda19 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -297,6 +297,45 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
297 | }); | 297 | }); |
298 | } | 298 | } |
299 | } | 299 | } |
300 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
301 | { | ||
302 | UUID destinationFolderID = UUID.Zero; | ||
303 | |||
304 | if (im.binaryBucket != null && im.binaryBucket.Length >= 16) | ||
305 | { | ||
306 | destinationFolderID = new UUID(im.binaryBucket, 0); | ||
307 | } | ||
308 | |||
309 | if (destinationFolderID != UUID.Zero) | ||
310 | { | ||
311 | IInventoryService invService = scene.InventoryService; | ||
312 | |||
313 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | ||
314 | |||
315 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | ||
316 | item = invService.GetItem(item); | ||
317 | InventoryFolderBase folder = null; | ||
318 | |||
319 | if (item != null) // It's an item | ||
320 | { | ||
321 | item.Folder = destinationFolderID; | ||
322 | |||
323 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | ||
324 | scene.AddInventoryItem(client, item); | ||
325 | } | ||
326 | else | ||
327 | { | ||
328 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | ||
329 | folder = invService.GetFolder(folder); | ||
330 | |||
331 | if (folder != null) // It's a folder | ||
332 | { | ||
333 | folder.ParentID = destinationFolderID; | ||
334 | invService.MoveFolder(folder); | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | } | ||
300 | else if ( | 339 | else if ( |
301 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined | 340 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined |
302 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) | 341 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) |