Implements llGetInventoryName() - the order is based upon inventory key, which probably doesn't match 100% with LL's grid.

0.6.0-stable
alondria 2008-03-24 19:58:53 +00:00
parent 45b9114df7
commit 3be815b206
1 changed files with 17 additions and 1 deletions

View File

@ -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<LLUUID, TaskInventoryItem> 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;
}