aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorUbitUmarov2019-08-16 21:22:16 +0100
committerUbitUmarov2019-08-16 21:24:07 +0100
commit64c56fc52bec87395574ba07bd13d7cdde042ff0 (patch)
tree2f2a1a2ea856ac34fe79f232e565a3856690d815 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parent move file HGworldMapModule to where it belongs( runprebuild) (diff)
downloadopensim-SC-64c56fc52bec87395574ba07bd13d7cdde042ff0.zip
opensim-SC-64c56fc52bec87395574ba07bd13d7cdde042ff0.tar.gz
opensim-SC-64c56fc52bec87395574ba07bd13d7cdde042ff0.tar.bz2
opensim-SC-64c56fc52bec87395574ba07bd13d7cdde042ff0.tar.xz
mantis 8577: add key osGetInventoryItemKey(string name) to get a inventory item ID within prim inventory. the llGetInventory does return the asset it, not item.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 62da221..6ee83ae 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -5479,6 +5479,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5479 return id.ToString(); 5479 return id.ToString();
5480 } 5480 }
5481 5481
5482 public LSL_Key osGetInventoryItemKey(LSL_String name)
5483 {
5484 m_host.AddScriptLPS(1);
5485
5486 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
5487
5488 if (item == null)
5489 return UUID.Zero.ToString();
5490
5491 if ((item.CurrentPermissions
5492 & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
5493 == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
5494 {
5495 return item.ItemID.ToString();
5496 }
5497
5498 return UUID.Zero.ToString();
5499 }
5500
5482 public LSL_String osGetInventoryName(LSL_Key itemId) 5501 public LSL_String osGetInventoryName(LSL_Key itemId)
5483 { 5502 {
5484 m_host.AddScriptLPS(1); 5503 m_host.AddScriptLPS(1);