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