From 3aa7ad24dab4896a92a35c8246a26aa25e69361a Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 14 Dec 2008 22:27:40 +0000
Subject: Make scripted item and folder gives pop up a "accept, decline"
message and allow deletion of the just received item.
---
OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 2546a26..5e16082 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1121,15 +1121,16 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
+ public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
{
InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
if (agentItem == null)
- return;
+ return null;
agentItem.Folder = folderId;
AddInventoryItem(remoteClient, agentItem);
+ return agentItem;
}
///
@@ -1178,13 +1179,13 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
+ public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
{
ScenePresence avatar;
if (TryGetAvatar(avatarId, out avatar))
{
- MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
+ return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
}
else
{
@@ -1201,11 +1202,13 @@ namespace OpenSim.Region.Environment.Scenes
InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
if (agentItem == null)
- return;
+ return null;
agentItem.Folder = folderId;
AddInventoryItem(avatarId, agentItem);
+
+ return agentItem;
}
}
@@ -1310,7 +1313,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List items)
+ public UUID MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List items)
{
CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
if (profile == null || profile.RootFolder == null)
@@ -1319,7 +1322,7 @@ namespace OpenSim.Region.Environment.Scenes
"[PRIM INVENTORY]: " +
"Avatar {0} cannot be found to add items",
destID);
- return;
+ return UUID.Zero;
}
UUID newFolderID = UUID.Random();
@@ -1347,6 +1350,8 @@ namespace OpenSim.Region.Environment.Scenes
profile.SendInventoryDecendents(avatar.ControllingClient,
newFolderID, false, true);
}
+
+ return newFolderID;
}
///
--
cgit v1.1