From 9117dfc858eaead065f02e6e87dea4e8a1decffe Mon Sep 17 00:00:00 2001 From: alondria Date: Mon, 24 Mar 2008 19:29:35 +0000 Subject: Implements llGetInventoryNumber() --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 75c1475..1b1a08f 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -1779,8 +1779,15 @@ namespace OpenSim.Region.ScriptEngine.Common public int llGetInventoryNumber(int type) { m_host.AddScriptLPS(1); - NotImplemented("llGetInventoryNumber"); - return 0; + int count = 0; + foreach (KeyValuePair inv in m_host.TaskInventory) + { + if (inv.Value.InvType == type) + { + count = count + 1; + } + } + return count; } public string llGetInventoryName(int type, int number) -- cgit v1.1