mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
search a prim inventory matching both name and asset type, on some LSL and OSSL
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user