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

This commit is contained in:
UbitUmarov
2022-10-24 02:12:15 +01:00
parent ff0422cbd7
commit 5d420346cb

View File

@@ -46,12 +46,12 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
/// <param name='type'></param>
public static UUID GetAssetIdFromItemName(SceneObjectPart part, string name, int type)
{
TaskInventoryItem item = part.Inventory.GetInventoryItem(name);
TaskInventoryItem item = part.Inventory.GetInventoryItem(name, type);
if (item != null && item.Type == type)
if (item is not null)
return item.AssetID;
else
return UUID.Zero;
return UUID.Zero;
}
/// <summary>