diff options
author | Justin Clark-Casey (justincc) | 2012-07-04 21:50:52 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-04 21:50:52 +0100 |
commit | 9fac7fd932aa929e350fb4795f5036f7dd0cf78f (patch) | |
tree | 04ad0298e000f32069c9343db3e6029a50e0d150 /OpenSim/Region | |
parent | refactor: In llGetInventoryCreator() use existing GetInventoryItem() (diff) | |
download | opensim-SC-9fac7fd932aa929e350fb4795f5036f7dd0cf78f.zip opensim-SC-9fac7fd932aa929e350fb4795f5036f7dd0cf78f.tar.gz opensim-SC-9fac7fd932aa929e350fb4795f5036f7dd0cf78f.tar.bz2 opensim-SC-9fac7fd932aa929e350fb4795f5036f7dd0cf78f.tar.xz |
refactor: In llGetInventoryType() use existing GetInventoryItem()
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 338ae88..a8a2a50 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9656,18 +9656,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9656 | { | 9656 | { |
9657 | m_host.AddScriptLPS(1); | 9657 | m_host.AddScriptLPS(1); |
9658 | 9658 | ||
9659 | lock (m_host.TaskInventory) | 9659 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
9660 | { | ||
9661 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
9662 | { | ||
9663 | if (inv.Value.Name == name) | ||
9664 | { | ||
9665 | return inv.Value.Type; | ||
9666 | } | ||
9667 | } | ||
9668 | } | ||
9669 | 9660 | ||
9670 | return -1; | 9661 | if (item == null) |
9662 | return -1; | ||
9663 | |||
9664 | return item.Type; | ||
9671 | } | 9665 | } |
9672 | 9666 | ||
9673 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) | 9667 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) |