aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs24
1 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index f57f752..b0602fc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4703,22 +4703,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4703 { 4703 {
4704 m_host.AddScriptLPS(1); 4704 m_host.AddScriptLPS(1);
4705 4705
4706 lock (m_host.TaskInventory) 4706 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
4707
4708 if (item == null)
4709 return UUID.Zero.ToString();
4710
4711 if ((item.CurrentPermissions
4712 & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
4713 == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
4707 { 4714 {
4708 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 4715 return item.AssetID.ToString();
4709 {
4710 if (inv.Value.Name == name)
4711 {
4712 if ((inv.Value.CurrentPermissions & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
4713 {
4714 return inv.Value.AssetID.ToString();
4715 }
4716 else
4717 {
4718 return UUID.Zero.ToString();
4719 }
4720 }
4721 }
4722 } 4716 }
4723 4717
4724 return UUID.Zero.ToString(); 4718 return UUID.Zero.ToString();