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

This commit is contained in:
UbitUmarov
2022-10-24 02:15:56 +01:00
parent d89a3bb17c
commit be5fc7344c
3 changed files with 25 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>();