diff options
Diffstat (limited to '')
3 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e114a53..070176b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -4874,8 +4874,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4874 | return Math.Atan2(mcross, dot); | 4874 | return Math.Atan2(mcross, dot); |
4875 | } | 4875 | } |
4876 | 4876 | ||
4877 | |||
4878 | //******* link sound | ||
4879 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) | 4877 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) |
4880 | { | 4878 | { |
4881 | m_host.AddScriptLPS(1); | 4879 | m_host.AddScriptLPS(1); |
@@ -5406,5 +5404,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5406 | return 1; | 5404 | return 1; |
5407 | } | 5405 | } |
5408 | 5406 | ||
5407 | public LSL_Key osGetInventoryLastOwner(string itemNameorid) | ||
5408 | { | ||
5409 | m_host.AddScriptLPS(1); | ||
5410 | |||
5411 | TaskInventoryItem item = null; | ||
5412 | UUID itemID; | ||
5413 | if (UUID.TryParse(itemNameorid, out itemID)) | ||
5414 | item = m_host.Inventory.GetInventoryItem(itemID); | ||
5415 | else | ||
5416 | item = m_host.Inventory.GetInventoryItem(itemNameorid); | ||
5417 | |||
5418 | if (item == null) | ||
5419 | return UUID.Zero.ToString(); | ||
5420 | |||
5421 | UUID id = item.LastOwnerID; | ||
5422 | if(id == UUID.Zero) | ||
5423 | id= item.OwnerID; | ||
5424 | return id.ToString(); | ||
5425 | } | ||
5409 | } | 5426 | } |
5410 | } \ No newline at end of file | 5427 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 67c0261..7277577 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -547,5 +547,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
547 | LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin); | 547 | LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin); |
548 | LSL_Integer osApproxEquals(rotation ra, rotation rb); | 548 | LSL_Integer osApproxEquals(rotation ra, rotation rb); |
549 | LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); | 549 | LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); |
550 | LSL_Key osGetInventoryLastOwner(string itemNameOrId); | ||
550 | } | 551 | } |
551 | } | 552 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 76d334b..bc64ac4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -1366,5 +1366,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1366 | { | 1366 | { |
1367 | return m_OSSL_Functions.osApproxEquals(ra, rb, margin); | 1367 | return m_OSSL_Functions.osApproxEquals(ra, rb, margin); |
1368 | } | 1368 | } |
1369 | |||
1370 | public LSL_Key osGetInventoryLastOwner(string itemNameOrId) | ||
1371 | { | ||
1372 | return m_OSSL_Functions.osGetInventoryLastOwner(itemNameOrId); | ||
1373 | } | ||
1374 | |||
1369 | } | 1375 | } |
1370 | } | 1376 | } |