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.
0.7.4-extended
Justin Clark-Casey (justincc) 2013-02-06 01:44:37 +00:00
parent eab1b1b9f8
commit 97fcc97902
1 changed files with 0 additions and 15 deletions

View File

@ -82,7 +82,6 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
return key;
}
/// <summary>
/// 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<UUID, TaskInventoryItem> item in part.TaskInventory)
{
if (item.Value.Type == (int)type && item.Value.Name == identifier)
{
key = item.Value.ItemID;
break;
}
}
}
}
return key;
}