From 97fcc97902c90c56750f88971ca1116442be8cdf Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 6 Feb 2013 01:44:37 +0000 Subject: [PATCH] Remove wrong code in ScriptUtils.GetAssetIdFromKeyOrItemName which would return the item ID instead of the asset ID if the identifier was a uuid that matched an inventory item name. This would practically never happen. This makes this overloaded version of the function consistent with the other version. It looks like this accidentally came over in commit c5af16a from Tue Oct 16 12:40:21 2012 However, there's arguably a case for looking for an item name that matches a UUID before assuming that the identifier is already an asset ID. --- .../Framework/Scenes/Scripting/ScriptUtils.cs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs b/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs index d8aa2584a6..f08ba59ea3 100644 --- a/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs +++ b/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs @@ -82,7 +82,6 @@ namespace OpenSim.Region.Framework.Scenes.Scripting return key; } - /// /// Return the UUID of the asset matching the specified key or name /// and asset type. @@ -101,20 +100,6 @@ namespace OpenSim.Region.Framework.Scenes.Scripting if (item != null && item.Type == (int)type) key = item.AssetID; } - else - { - lock (part.TaskInventory) - { - foreach (KeyValuePair item in part.TaskInventory) - { - if (item.Value.Type == (int)type && item.Value.Name == identifier) - { - key = item.Value.ItemID; - break; - } - } - } - } return key; }