mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Implements llGetInventoryName() - the order is based upon inventory key, which probably doesn't match 100% with LL's grid.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user