From 5d420346cbf284f9ca09df870c0e9c9ce3133b12 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 24 Oct 2022 02:12:15 +0100 Subject: [PATCH] search a prim inventory matching both name and asset type, on some LSL and OSSL, other functions --- OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs b/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs index fc6590918b..604068079d 100644 --- a/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs +++ b/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs @@ -46,12 +46,12 @@ namespace OpenSim.Region.Framework.Scenes.Scripting /// 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; } ///