Implements llGetInventoryPermMask()

0.6.0-stable
alondria 2008-03-24 21:56:52 +00:00
parent dd6a9ffbc7
commit 15a22e993d
3 changed files with 25 additions and 5 deletions

View File

@ -1637,9 +1637,9 @@ namespace OpenSim.Region.ScriptEngine.Common
m_LSL_Functions.llSetObjectPermMask(mask, value); m_LSL_Functions.llSetObjectPermMask(mask, value);
} }
public void llGetInventoryPermMask(string item, int mask) public int llGetInventoryPermMask(string item, int mask)
{ {
m_LSL_Functions.llGetInventoryPermMask(item, mask); return m_LSL_Functions.llGetInventoryPermMask(item, mask);
} }
public void llSetInventoryPermMask(string item, int mask, int value) public void llSetInventoryPermMask(string item, int mask, int value)

View File

@ -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); m_host.AddScriptLPS(1);
NotImplemented("llGetInventoryPermMask"); foreach (KeyValuePair<LLUUID, TaskInventoryItem> 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) public void llSetInventoryPermMask(string item, int mask, int value)

View File

@ -560,7 +560,7 @@ namespace OpenSim.Region.ScriptEngine.Common
//wiki: llSetObjectPermMask(integer mask, integer value) //wiki: llSetObjectPermMask(integer mask, integer value)
void llSetObjectPermMask(int mask, int value); void llSetObjectPermMask(int mask, int value);
//wiki integer llGetInventoryPermMask(string item, integer mask) //wiki integer llGetInventoryPermMask(string item, integer mask)
void llGetInventoryPermMask(string item, int mask); int llGetInventoryPermMask(string item, int mask);
//wiki: llSetInventoryPermMask(string item, integer mask, integer value) //wiki: llSetInventoryPermMask(string item, integer mask, integer value)
void llSetInventoryPermMask(string item, int mask, int value); void llSetInventoryPermMask(string item, int mask, int value);
//wiki: key llGetInventoryCreator(string item) //wiki: key llGetInventoryCreator(string item)