From a2b1a1787d620f70c10221545414b41ffdfe27da Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 25 Jun 2008 14:30:28 +0000 Subject: Minor formatting cleanup. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 08cf4a7..a9d1309 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2697,40 +2697,40 @@ namespace OpenSim.Region.ScriptEngine.Common public void llGiveInventory(string destination, string inventory) { m_host.AddScriptLPS(1); - bool found = false; - LLUUID destId = LLUUID.Zero; - LLUUID objId = LLUUID.Zero; - - if(!LLUUID.TryParse(destination, out destId)) - { - llSay(0, "Could not parse key " + destination); - return; - } - - // move the first object found with this inventory name - foreach (KeyValuePair inv in m_host.TaskInventory) - { - if (inv.Value.Name == inventory) - { - found = true; - objId = inv.Key; - break; - } - } - - // check if destination is an avatar - if (World.GetScenePresence(destId) != null) - { - // destination is an avatar + bool found = false; + LLUUID destId = LLUUID.Zero; + LLUUID objId = LLUUID.Zero; + + if (!LLUUID.TryParse(destination, out destId)) + { + llSay(0, "Could not parse key " + destination); + return; + } + + // move the first object found with this inventory name + foreach (KeyValuePair inv in m_host.TaskInventory) + { + if (inv.Value.Name == inventory) + { + found = true; + objId = inv.Key; + break; + } + } + + // check if destination is an avatar + if (World.GetScenePresence(destId) != null) + { + // destination is an avatar World.MoveTaskInventoryItem(destId, null, m_host, objId); - } - else - { - // destination is an object + } + else + { + // destination is an object World.MoveTaskInventoryItem(destId, m_host, objId); - } + } - if (!found) + if (!found) llSay(0, "Could not find object " + inventory); } -- cgit v1.1