diff options
author | Justin Clark-Casey (justincc) | 2013-02-06 01:44:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-06 01:49:32 +0000 |
commit | dfe5826f9fd8854ddb5f0cc465564d8f124d7786 (patch) | |
tree | 6c87b0cb9f429ba680ecc990e2acf21cc81cb0a0 /OpenSim/Region/Framework | |
parent | Allow JsonReadNotecard() to accept the name of the notecard as well as the as... (diff) | |
download | opensim-SC-dfe5826f9fd8854ddb5f0cc465564d8f124d7786.zip opensim-SC-dfe5826f9fd8854ddb5f0cc465564d8f124d7786.tar.gz opensim-SC-dfe5826f9fd8854ddb5f0cc465564d8f124d7786.tar.bz2 opensim-SC-dfe5826f9fd8854ddb5f0cc465564d8f124d7786.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scripting/ScriptUtils.cs | 15 |
1 files changed, 0 insertions, 15 deletions
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 | |||
82 | return key; | 82 | return key; |
83 | } | 83 | } |
84 | 84 | ||
85 | |||
86 | /// <summary> | 85 | /// <summary> |
87 | /// Return the UUID of the asset matching the specified key or name | 86 | /// Return the UUID of the asset matching the specified key or name |
88 | /// and asset type. | 87 | /// and asset type. |
@@ -101,20 +100,6 @@ namespace OpenSim.Region.Framework.Scenes.Scripting | |||
101 | if (item != null && item.Type == (int)type) | 100 | if (item != null && item.Type == (int)type) |
102 | key = item.AssetID; | 101 | key = item.AssetID; |
103 | } | 102 | } |
104 | else | ||
105 | { | ||
106 | lock (part.TaskInventory) | ||
107 | { | ||
108 | foreach (KeyValuePair<UUID, TaskInventoryItem> item in part.TaskInventory) | ||
109 | { | ||
110 | if (item.Value.Type == (int)type && item.Value.Name == identifier) | ||
111 | { | ||
112 | key = item.Value.ItemID; | ||
113 | break; | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | 103 | ||
119 | return key; | 104 | return key; |
120 | } | 105 | } |