diff options
Merge commit '760010d6fb6aac313d79ce0a4d0016d3809246a0' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
Diffstat (limited to 'OpenSim/Region/Framework')
4 files changed, 22 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 4b17b9a..32f4eea 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | |||
@@ -157,6 +157,15 @@ namespace OpenSim.Region.Framework.Interfaces | |||
157 | TaskInventoryItem GetInventoryItem(UUID itemId); | 157 | TaskInventoryItem GetInventoryItem(UUID itemId); |
158 | 158 | ||
159 | /// <summary> | 159 | /// <summary> |
160 | /// Get all inventory items. | ||
161 | /// </summary> | ||
162 | /// <param name="name"></param> | ||
163 | /// <returns> | ||
164 | /// If there are no inventory items then an empty list is returned. | ||
165 | /// </returns> | ||
166 | List<TaskInventoryItem> GetInventoryItems(); | ||
167 | |||
168 | /// <summary> | ||
160 | /// Get inventory items by name. | 169 | /// Get inventory items by name. |
161 | /// </summary> | 170 | /// </summary> |
162 | /// <param name="name"></param> | 171 | /// <param name="name"></param> |
@@ -164,7 +173,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
164 | /// A list of inventory items with that name. | 173 | /// A list of inventory items with that name. |
165 | /// If no inventory item has that name then an empty list is returned. | 174 | /// If no inventory item has that name then an empty list is returned. |
166 | /// </returns> | 175 | /// </returns> |
167 | IList<TaskInventoryItem> GetInventoryItems(string name); | 176 | List<TaskInventoryItem> GetInventoryItems(string name); |
168 | 177 | ||
169 | /// <summary> | 178 | /// <summary> |
170 | /// Get the scene object referenced by an inventory item. | 179 | /// Get the scene object referenced by an inventory item. |
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 | { |