Thank you, Melanie, very kindly for a patch that :

Implements llGetInventoryKey with perms checking. 
Adds perms checking to llGetTexture, adds type checking to llStartSound, 
allows llSetTexture to reference textures by name
0.6.0-stable
Charles Krinke 2008-04-18 02:23:48 +00:00
parent dd4deebbcb
commit ea8b6a28ed
1 changed files with 15 additions and 2 deletions

View File

@ -2242,8 +2242,21 @@ namespace OpenSim.Region.ScriptEngine.Common
public string llGetInventoryKey(string name)
{
m_host.AddScriptLPS(1);
NotImplemented("llGetInventoryKey");
return String.Empty;
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{
if(inv.Value.Name == name)
{
if((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
{
return inv.Value.AssetID.ToString();
}
else
{
return LLUUID.Zero.ToString();
}
}
}
return LLUUID.Zero.ToString();
}
public void llAllowInventoryDrop(int add)