search a prim inventory matching both name and asset type, on some LSL and OSSL

This commit is contained in:
UbitUmarov
2022-10-24 01:37:01 +01:00
parent 0289011442
commit ff0422cbd7
3 changed files with 26 additions and 9 deletions

View File

@@ -1095,6 +1095,22 @@ namespace OpenSim.Region.Framework.Scenes
return null;
}
public TaskInventoryItem GetInventoryItem(string name, int type)
{
m_items.LockItemsForRead(true);
foreach (TaskInventoryItem item in m_items.Values)
{
if (item.Type == type && item.Name == name)
{
m_items.LockItemsForRead(false);
return item;
}
}
m_items.LockItemsForRead(false);
return null;
}
public List<TaskInventoryItem> GetInventoryItems(string name)
{
List<TaskInventoryItem> items = new List<TaskInventoryItem>();