From 3be815b2065351fdba71345f45a635e081fa5eeb Mon Sep 17 00:00:00 2001 From: alondria Date: Mon, 24 Mar 2008 19:58:53 +0000 Subject: Implements llGetInventoryName() - the order is based upon inventory key, which probably doesn't match 100% with LL's grid. --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1b1a08f..b5df2ac 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -1793,7 +1793,23 @@ namespace OpenSim.Region.ScriptEngine.Common public string llGetInventoryName(int type, int number) { m_host.AddScriptLPS(1); - NotImplemented("llGetInventoryName"); + ArrayList keys = new ArrayList(); + foreach (KeyValuePair inv in m_host.TaskInventory) + { + if (inv.Value.InvType == type) + { + keys.Add(inv.Key.ToString()); + } + } + if (keys.Count == 0) + { + + } + keys.Sort(); + if (keys.Count > number) + { + return m_host.TaskInventory[LLUUID.Parse((string)keys[number])].Name; + } return String.Empty; } -- cgit v1.1