From 5c660ea0c59a15000e40fd7be7421c5f99bbe96c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 24 Apr 2008 15:11:19 +0000 Subject: * Patch from Melanie. Mantis: 1040. Thanks Melanie! * Implements llDeleteSubList in all it's modes. Corrects type selection in inventory functions. Adds support for INVENTORY_ALL selector --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 3273023..35f8ee0 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2269,7 +2269,7 @@ namespace OpenSim.Region.ScriptEngine.Common int count = 0; foreach (KeyValuePair inv in m_host.TaskInventory) { - if (inv.Value.InvType == type) + if (inv.Value.Type == type || type == -1) { count = count + 1; } @@ -2283,7 +2283,7 @@ namespace OpenSim.Region.ScriptEngine.Common ArrayList keys = new ArrayList(); foreach (KeyValuePair inv in m_host.TaskInventory) { - if (inv.Value.InvType == type) + if (inv.Value.Type == type || type == -1) { keys.Add(inv.Value.Name); } @@ -2972,12 +2972,7 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end) { - //LSL_Types.list ret = new LSL_Types.list(src); - //ret.RemoveRange(start, end - start); - //return ret; - - // Just a hunch - needs testing - return src.GetSublist(end, start); + return src.DeleteSublist(end, start); } public int llGetListEntryType(LSL_Types.list src, int index) -- cgit v1.1