From dfe5826f9fd8854ddb5f0cc465564d8f124d7786 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 6 Feb 2013 01:44:37 +0000 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scripting') diff --git a/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs b/OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs index d8aa258..f08ba59 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; } -- cgit v1.1