diff options
author | Melanie | 2011-12-07 01:02:46 +0100 |
---|---|---|
committer | Melanie | 2011-12-07 01:02:46 +0100 |
commit | f317953290f7240768bf52238541663134ac76ea (patch) | |
tree | 3264b94b7fcff756a501c3c7130ac1a5feaa6387 /OpenSim/Region/CoreModules/Avatar | |
parent | Fix task inventory giving (diff) | |
download | opensim-SC-f317953290f7240768bf52238541663134ac76ea.zip opensim-SC-f317953290f7240768bf52238541663134ac76ea.tar.gz opensim-SC-f317953290f7240768bf52238541663134ac76ea.tar.bz2 opensim-SC-f317953290f7240768bf52238541663134ac76ea.tar.xz |
Fix up intersim give messaging
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 677fab9..8824cab 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -474,8 +474,48 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
474 | } | 474 | } |
475 | user.ControllingClient.SendInstantMessage(im); | 475 | user.ControllingClient.SendInstantMessage(im); |
476 | } | 476 | } |
477 | if (im.dialog == (byte) InstantMessageDialog.TaskInventoryOffered) | ||
478 | { | ||
479 | if (im.binaryBucket.Length < 1) // Invalid | ||
480 | return; | ||
481 | |||
482 | UUID recipientID = new UUID(im.toAgentID); | ||
483 | |||
484 | // Bucket is the asset type | ||
485 | AssetType assetType = (AssetType)im.binaryBucket[0]; | ||
486 | |||
487 | if (AssetType.Folder == assetType) | ||
488 | { | ||
489 | UUID folderID = new UUID(im.imSessionID); | ||
490 | |||
491 | InventoryFolderBase given = | ||
492 | new InventoryFolderBase(folderID, recipientID); | ||
493 | InventoryFolderBase folder = | ||
494 | scene.InventoryService.GetFolder(given); | ||
495 | |||
496 | if (folder != null) | ||
497 | user.ControllingClient.SendBulkUpdateInventory(folder); | ||
498 | } | ||
499 | else | ||
500 | { | ||
501 | UUID itemID = new UUID(im.imSessionID); | ||
502 | |||
503 | InventoryItemBase given = | ||
504 | new InventoryItemBase(itemID, recipientID); | ||
505 | InventoryItemBase item = | ||
506 | scene.InventoryService.GetItem(given); | ||
507 | |||
508 | if (item != null) | ||
509 | { | ||
510 | user.ControllingClient.SendBulkUpdateInventory(item); | ||
511 | } | ||
512 | } | ||
513 | user.ControllingClient.SendInstantMessage(im); | ||
514 | } | ||
477 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || | 515 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || |
478 | im.dialog == (byte) InstantMessageDialog.InventoryDeclined) | 516 | im.dialog == (byte) InstantMessageDialog.InventoryDeclined || |
517 | im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined || | ||
518 | im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
479 | { | 519 | { |
480 | user.ControllingClient.SendInstantMessage(im); | 520 | user.ControllingClient.SendInstantMessage(im); |
481 | } | 521 | } |