aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
authoralondria2008-03-24 19:58:53 +0000
committeralondria2008-03-24 19:58:53 +0000
commit3be815b2065351fdba71345f45a635e081fa5eeb (patch)
tree8ed9aee32858a95eb47af21205a08a9fbf6efb33 /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
parentFrom: Michael Osias <mosias@us.ibm.com> (diff)
downloadopensim-SC_OLD-3be815b2065351fdba71345f45a635e081fa5eeb.zip
opensim-SC_OLD-3be815b2065351fdba71345f45a635e081fa5eeb.tar.gz
opensim-SC_OLD-3be815b2065351fdba71345f45a635e081fa5eeb.tar.bz2
opensim-SC_OLD-3be815b2065351fdba71345f45a635e081fa5eeb.tar.xz
Implements llGetInventoryName() - the order is based upon inventory key, which probably doesn't match 100% with LL's grid.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs18
1 files changed, 17 insertions, 1 deletions
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
1793 public string llGetInventoryName(int type, int number) 1793 public string llGetInventoryName(int type, int number)
1794 { 1794 {
1795 m_host.AddScriptLPS(1); 1795 m_host.AddScriptLPS(1);
1796 NotImplemented("llGetInventoryName"); 1796 ArrayList keys = new ArrayList();
1797 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
1798 {
1799 if (inv.Value.InvType == type)
1800 {
1801 keys.Add(inv.Key.ToString());
1802 }
1803 }
1804 if (keys.Count == 0)
1805 {
1806
1807 }
1808 keys.Sort();
1809 if (keys.Count > number)
1810 {
1811 return m_host.TaskInventory[LLUUID.Parse((string)keys[number])].Name;
1812 }
1797 return String.Empty; 1813 return String.Empty;
1798 } 1814 }
1799 1815