From ae2174d8f526b225c3cccf551f1a9f01d6569203 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 29 Jan 2010 18:11:53 +0000
Subject: Add method to get all items with the same name from a particular prim
Extend load oar test to check loading of a sound item
---
.../Framework/Scenes/SceneObjectPartInventory.cs | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
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
m_items.TryGetValue(itemId, out item);
return item;
- }
+ }
+
+ ///
+ /// Get inventory items by name.
+ ///
+ ///
+ ///
+ /// A list of inventory items with that name.
+ /// If no inventory item has that name then an empty list is returned.
+ ///
+ public IList GetInventoryItems(string name)
+ {
+ IList items = new List();
+ lock (m_items)
+ {
+ foreach (TaskInventoryItem item in m_items.Values)
+ {
+ if (item.Name == name)
+ items.Add(item);
+ }
+ }
+
+ return items;
+ }
+
///
/// Update an existing inventory item.
///
--
cgit v1.1