aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5f13278..b37e1a2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -554,8 +554,32 @@ namespace OpenSim.Region.Framework.Scenes
554 m_items.TryGetValue(itemId, out item); 554 m_items.TryGetValue(itemId, out item);
555 555
556 return item; 556 return item;
557 } 557 }
558
559 /// <summary>
560 /// Get inventory items by name.
561 /// </summary>
562 /// <param name="name"></param>
563 /// <returns>
564 /// A list of inventory items with that name.
565 /// If no inventory item has that name then an empty list is returned.
566 /// </returns>
567 public IList<TaskInventoryItem> GetInventoryItems(string name)
568 {
569 IList<TaskInventoryItem> items = new List<TaskInventoryItem>();
558 570
571 lock (m_items)
572 {
573 foreach (TaskInventoryItem item in m_items.Values)
574 {
575 if (item.Name == name)
576 items.Add(item);
577 }
578 }
579
580 return items;
581 }
582
559 /// <summary> 583 /// <summary>
560 /// Update an existing inventory item. 584 /// Update an existing inventory item.
561 /// </summary> 585 /// </summary>