From ea8b6a28ed2ce004dab7c185c94a16faf96b4fe7 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 18 Apr 2008 02:23:48 +0000 Subject: 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 --- .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d8ad914..57a579a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -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 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) -- cgit v1.1