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
This commit is contained in:
Justin Clark-Casey (justincc)
2010-01-29 18:11:53 +00:00
parent 536a6bac72
commit ae2174d8f5
3 changed files with 41 additions and 7 deletions

View File

@@ -554,8 +554,32 @@ namespace OpenSim.Region.Framework.Scenes
m_items.TryGetValue(itemId, out item);
return item;
}
}
/// <summary>
/// Get inventory items by name.
/// </summary>
/// <param name="name"></param>
/// <returns>
/// A list of inventory items with that name.
/// If no inventory item has that name then an empty list is returned.
/// </returns>
public IList<TaskInventoryItem> GetInventoryItems(string name)
{
IList<TaskInventoryItem> items = new List<TaskInventoryItem>();
lock (m_items)
{
foreach (TaskInventoryItem item in m_items.Values)
{
if (item.Name == name)
items.Add(item);
}
}
return items;
}
/// <summary>
/// Update an existing inventory item.
/// </summary>