diff options
author | Justin Clark-Casey (justincc) | 2012-07-04 21:49:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-04 21:49:21 +0100 |
commit | f2b0377c28623ee915387fef37c88ab3b7694ba8 (patch) | |
tree | a90b28e93bb00911b65ed0c2899f35dc6fc765e0 | |
parent | refactor: In llGetInventoryPermMask() use existing GetInventoryItem() (diff) | |
download | opensim-SC-f2b0377c28623ee915387fef37c88ab3b7694ba8.zip opensim-SC-f2b0377c28623ee915387fef37c88ab3b7694ba8.tar.gz opensim-SC-f2b0377c28623ee915387fef37c88ab3b7694ba8.tar.bz2 opensim-SC-f2b0377c28623ee915387fef37c88ab3b7694ba8.tar.xz |
refactor: In llGetInventoryCreator() use existing GetInventoryItem()
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fce09bf..338ae88 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9093,24 +9093,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9093 | } | 9093 | } |
9094 | } | 9094 | } |
9095 | 9095 | ||
9096 | public LSL_String llGetInventoryCreator(string item) | 9096 | public LSL_String llGetInventoryCreator(string itemName) |
9097 | { | 9097 | { |
9098 | m_host.AddScriptLPS(1); | 9098 | m_host.AddScriptLPS(1); |
9099 | 9099 | ||
9100 | lock (m_host.TaskInventory) | 9100 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); |
9101 | |||
9102 | if (item == null) | ||
9101 | { | 9103 | { |
9102 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | 9104 | llSay(0, "No item name '" + item + "'"); |
9103 | { | ||
9104 | if (inv.Value.Name == item) | ||
9105 | { | ||
9106 | return inv.Value.CreatorID.ToString(); | ||
9107 | } | ||
9108 | } | ||
9109 | } | ||
9110 | 9105 | ||
9111 | llSay(0, "No item name '" + item + "'"); | 9106 | return String.Empty; |
9107 | } | ||
9112 | 9108 | ||
9113 | return String.Empty; | 9109 | return item.CreatorID.ToString(); |
9114 | } | 9110 | } |
9115 | 9111 | ||
9116 | public void llOwnerSay(string msg) | 9112 | public void llOwnerSay(string msg) |