diff options
author | UbitUmarov | 2019-02-21 23:11:03 +0000 |
---|---|---|
committer | UbitUmarov | 2019-02-21 23:11:03 +0000 |
commit | bd27573130d4a40d678c81c687591708ab4e4f34 (patch) | |
tree | f757635e4dbffa158de3e8782d0676f319353e15 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | let changed allowed drop have lldetectedkey[0] return the dropped item id, Ye... (diff) | |
download | opensim-SC-bd27573130d4a40d678c81c687591708ab4e4f34.zip opensim-SC-bd27573130d4a40d678c81c687591708ab4e4f34.tar.gz opensim-SC-bd27573130d4a40d678c81c687591708ab4e4f34.tar.bz2 opensim-SC-bd27573130d4a40d678c81c687591708ab4e4f34.tar.xz |
add LSL_String osGetInventoryName(LSL_Key itemId) and LSL_String osGetInventoryDescription(LSL_String itemNameOrId)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 070176b..e4cc3aa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -5404,7 +5404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5404 | return 1; | 5404 | return 1; |
5405 | } | 5405 | } |
5406 | 5406 | ||
5407 | public LSL_Key osGetInventoryLastOwner(string itemNameorid) | 5407 | public LSL_Key osGetInventoryLastOwner(LSL_String itemNameorid) |
5408 | { | 5408 | { |
5409 | m_host.AddScriptLPS(1); | 5409 | m_host.AddScriptLPS(1); |
5410 | 5410 | ||
@@ -5423,5 +5423,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5423 | id= item.OwnerID; | 5423 | id= item.OwnerID; |
5424 | return id.ToString(); | 5424 | return id.ToString(); |
5425 | } | 5425 | } |
5426 | |||
5427 | public LSL_String osGetInventoryName(LSL_Key itemId) | ||
5428 | { | ||
5429 | m_host.AddScriptLPS(1); | ||
5430 | |||
5431 | TaskInventoryItem item = null; | ||
5432 | UUID itemID; | ||
5433 | if (UUID.TryParse(itemId, out itemID)) | ||
5434 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5435 | |||
5436 | if (item == null) | ||
5437 | return String.Empty; | ||
5438 | |||
5439 | return item.Name; | ||
5440 | } | ||
5441 | |||
5442 | public LSL_String osGetInventoryDescription(LSL_String itemNameorid) | ||
5443 | { | ||
5444 | m_host.AddScriptLPS(1); | ||
5445 | |||
5446 | TaskInventoryItem item = null; | ||
5447 | UUID itemID; | ||
5448 | if (UUID.TryParse(itemNameorid, out itemID)) | ||
5449 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5450 | else | ||
5451 | item = m_host.Inventory.GetInventoryItem(itemNameorid); | ||
5452 | |||
5453 | if (item == null) | ||
5454 | return String.Empty; | ||
5455 | |||
5456 | return item.Description; | ||
5457 | } | ||
5426 | } | 5458 | } |
5427 | } \ No newline at end of file | 5459 | } \ No newline at end of file |