diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
3 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index d1739de..6cf1067 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1217,9 +1217,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1217 | /// <summary> | 1217 | /// <summary> |
1218 | /// Copy a task (prim) inventory item to another task (prim) | 1218 | /// Copy a task (prim) inventory item to another task (prim) |
1219 | /// </summary> | 1219 | /// </summary> |
1220 | /// <param name="destId"></param> | 1220 | /// <param name="destId">ID of destination part</param> |
1221 | /// <param name="part"></param> | 1221 | /// <param name="part">Source part</param> |
1222 | /// <param name="itemId"></param> | 1222 | /// <param name="itemId">Source item id to transfer</param> |
1223 | public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId) | 1223 | public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId) |
1224 | { | 1224 | { |
1225 | TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId); | 1225 | TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId); |
@@ -1247,14 +1247,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1247 | 1247 | ||
1248 | // Can't transfer this | 1248 | // Can't transfer this |
1249 | // | 1249 | // |
1250 | if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)) | 1250 | if (part.OwnerID != destPart.OwnerID && (srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) |
1251 | return; | 1251 | return; |
1252 | 1252 | ||
1253 | bool overrideNoMod = false; | 1253 | bool overrideNoMod = false; |
1254 | if ((part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0) | 1254 | if ((part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0) |
1255 | overrideNoMod = true; | 1255 | overrideNoMod = true; |
1256 | 1256 | ||
1257 | if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) | 1257 | if (part.OwnerID != destPart.OwnerID && (destPart.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) |
1258 | { | 1258 | { |
1259 | // object cannot copy items to an object owned by a different owner | 1259 | // object cannot copy items to an object owned by a different owner |
1260 | // unless llAllowInventoryDrop has been called | 1260 | // unless llAllowInventoryDrop has been called |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index ca85d10..ac44ce9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -778,9 +778,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
778 | /// A list of inventory items with that name. | 778 | /// A list of inventory items with that name. |
779 | /// If no inventory item has that name then an empty list is returned. | 779 | /// If no inventory item has that name then an empty list is returned. |
780 | /// </returns> | 780 | /// </returns> |
781 | public IList<TaskInventoryItem> GetInventoryItems(string name) | 781 | public List<TaskInventoryItem> GetInventoryItems(string name) |
782 | { | 782 | { |
783 | IList<TaskInventoryItem> items = new List<TaskInventoryItem>(); | 783 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); |
784 | 784 | ||
785 | m_items.LockItemsForRead(true); | 785 | m_items.LockItemsForRead(true); |
786 | 786 | ||
@@ -1295,7 +1295,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1295 | 1295 | ||
1296 | public List<TaskInventoryItem> GetInventoryItems() | 1296 | public List<TaskInventoryItem> GetInventoryItems() |
1297 | { | 1297 | { |
1298 | List<TaskInventoryItem> ret = new List<TaskInventoryItem>(); | 1298 | List<TaskInventoryItem> ret = new List<TaskInventoryItem>(); |
1299 | 1299 | ||
1300 | lock (m_items) | 1300 | lock (m_items) |
1301 | ret = new List<TaskInventoryItem>(m_items.Values); | 1301 | ret = new List<TaskInventoryItem>(m_items.Values); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index e16903c..55c80f5 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Tests | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /// <summary> | 115 | /// <summary> |
116 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. | 116 | /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. |
117 | /// </summary> | 117 | /// </summary> |
118 | /// <remarks> | 118 | /// <remarks> |
119 | /// This should place it in the most suitable user folder. | 119 | /// This should place it in the most suitable user folder. |
@@ -142,9 +142,11 @@ namespace OpenSim.Region.Framework.Tests | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /// <summary> | 144 | /// <summary> |
145 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. | 145 | /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. |
146 | /// </summary> | 146 | /// </summary> |
147 | /// <remarks> | ||
147 | /// This should place it in the most suitable user folder. | 148 | /// This should place it in the most suitable user folder. |
149 | /// </remarks> | ||
148 | [Test] | 150 | [Test] |
149 | public void TestMoveTaskInventoryItemNoParent() | 151 | public void TestMoveTaskInventoryItemNoParent() |
150 | { | 152 | { |