aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-12-14 22:27:40 +0000
committerMelanie Thielker2008-12-14 22:27:40 +0000
commit3aa7ad24dab4896a92a35c8246a26aa25e69361a (patch)
tree5e40e0103a5ab7368e3081242445e04bc7d236f8 /OpenSim/Region/Environment/Scenes
parentWas missed some time ago, it seems... (diff)
downloadopensim-SC_OLD-3aa7ad24dab4896a92a35c8246a26aa25e69361a.zip
opensim-SC_OLD-3aa7ad24dab4896a92a35c8246a26aa25e69361a.tar.gz
opensim-SC_OLD-3aa7ad24dab4896a92a35c8246a26aa25e69361a.tar.bz2
opensim-SC_OLD-3aa7ad24dab4896a92a35c8246a26aa25e69361a.tar.xz
Make scripted item and folder gives pop up a "accept, decline" message
and allow deletion of the just received item.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs19
1 files changed, 12 insertions, 7 deletions
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
1121 /// <param name="folderID"></param> 1121 /// <param name="folderID"></param>
1122 /// <param name="part"></param> 1122 /// <param name="part"></param>
1123 /// <param name="itemID"></param> 1123 /// <param name="itemID"></param>
1124 public void MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId) 1124 public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
1125 { 1125 {
1126 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); 1126 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
1127 1127
1128 if (agentItem == null) 1128 if (agentItem == null)
1129 return; 1129 return null;
1130 1130
1131 agentItem.Folder = folderId; 1131 agentItem.Folder = folderId;
1132 AddInventoryItem(remoteClient, agentItem); 1132 AddInventoryItem(remoteClient, agentItem);
1133 return agentItem;
1133 } 1134 }
1134 1135
1135 /// <summary> 1136 /// <summary>
@@ -1178,13 +1179,13 @@ namespace OpenSim.Region.Environment.Scenes
1178 /// <param name="folderID"></param> 1179 /// <param name="folderID"></param>
1179 /// <param name="part"></param> 1180 /// <param name="part"></param>
1180 /// <param name="itemID"></param> 1181 /// <param name="itemID"></param>
1181 public void MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId) 1182 public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
1182 { 1183 {
1183 ScenePresence avatar; 1184 ScenePresence avatar;
1184 1185
1185 if (TryGetAvatar(avatarId, out avatar)) 1186 if (TryGetAvatar(avatarId, out avatar))
1186 { 1187 {
1187 MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId); 1188 return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
1188 } 1189 }
1189 else 1190 else
1190 { 1191 {
@@ -1201,11 +1202,13 @@ namespace OpenSim.Region.Environment.Scenes
1201 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId); 1202 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
1202 1203
1203 if (agentItem == null) 1204 if (agentItem == null)
1204 return; 1205 return null;
1205 1206
1206 agentItem.Folder = folderId; 1207 agentItem.Folder = folderId;
1207 1208
1208 AddInventoryItem(avatarId, agentItem); 1209 AddInventoryItem(avatarId, agentItem);
1210
1211 return agentItem;
1209 } 1212 }
1210 } 1213 }
1211 1214
@@ -1310,7 +1313,7 @@ namespace OpenSim.Region.Environment.Scenes
1310 } 1313 }
1311 } 1314 }
1312 1315
1313 public void MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List<UUID> items) 1316 public UUID MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List<UUID> items)
1314 { 1317 {
1315 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1318 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1316 if (profile == null || profile.RootFolder == null) 1319 if (profile == null || profile.RootFolder == null)
@@ -1319,7 +1322,7 @@ namespace OpenSim.Region.Environment.Scenes
1319 "[PRIM INVENTORY]: " + 1322 "[PRIM INVENTORY]: " +
1320 "Avatar {0} cannot be found to add items", 1323 "Avatar {0} cannot be found to add items",
1321 destID); 1324 destID);
1322 return; 1325 return UUID.Zero;
1323 } 1326 }
1324 1327
1325 UUID newFolderID = UUID.Random(); 1328 UUID newFolderID = UUID.Random();
@@ -1347,6 +1350,8 @@ namespace OpenSim.Region.Environment.Scenes
1347 profile.SendInventoryDecendents(avatar.ControllingClient, 1350 profile.SendInventoryDecendents(avatar.ControllingClient,
1348 newFolderID, false, true); 1351 newFolderID, false, true);
1349 } 1352 }
1353
1354 return newFolderID;
1350 } 1355 }
1351 1356
1352 /// <summary> 1357 /// <summary>