From 15a22e993d7097cf4cf0eb42121921c3fd4ee745 Mon Sep 17 00:00:00 2001 From: alondria Date: Mon, 24 Mar 2008 21:56:52 +0000 Subject: Implements llGetInventoryPermMask() --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index f66bfe4..499445a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -4113,10 +4113,30 @@ namespace OpenSim.Region.ScriptEngine.Common } } - public void llGetInventoryPermMask(string item, int mask) + public int llGetInventoryPermMask(string item, int mask) { m_host.AddScriptLPS(1); - NotImplemented("llGetInventoryPermMask"); + foreach (KeyValuePair inv in m_host.TaskInventory) + { + if (inv.Value.Name == item) + { + switch (mask) + { + case 0: + return (int)inv.Value.BaseMask; + case 1: + return (int)inv.Value.OwnerMask; + case 2: + return (int)inv.Value.GroupMask; + case 3: + return (int)inv.Value.EveryoneMask; + case 4: + return (int)inv.Value.NextOwnerMask; + } + } + } + return -1; + //NotImplemented("llGetInventoryPermMask"); } public void llSetInventoryPermMask(string item, int mask, int value) -- cgit v1.1