diff options
author | Jeff Ames | 2008-06-25 14:30:28 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-25 14:30:28 +0000 |
commit | a2b1a1787d620f70c10221545414b41ffdfe27da (patch) | |
tree | fe356d669c4dffab062192a6676acb3cf4c6641c /OpenSim/Region/ScriptEngine/Common | |
parent | Mantis#1584. Thank you kindly, Lulurun for a patch that: (diff) | |
download | opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.zip opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.gz opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.bz2 opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.xz |
Minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 62 |
1 files changed, 31 insertions, 31 deletions
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 | |||
2697 | public void llGiveInventory(string destination, string inventory) | 2697 | public void llGiveInventory(string destination, string inventory) |
2698 | { | 2698 | { |
2699 | m_host.AddScriptLPS(1); | 2699 | m_host.AddScriptLPS(1); |
2700 | bool found = false; | 2700 | bool found = false; |
2701 | LLUUID destId = LLUUID.Zero; | 2701 | LLUUID destId = LLUUID.Zero; |
2702 | LLUUID objId = LLUUID.Zero; | 2702 | LLUUID objId = LLUUID.Zero; |
2703 | 2703 | ||
2704 | if(!LLUUID.TryParse(destination, out destId)) | 2704 | if (!LLUUID.TryParse(destination, out destId)) |
2705 | { | 2705 | { |
2706 | llSay(0, "Could not parse key " + destination); | 2706 | llSay(0, "Could not parse key " + destination); |
2707 | return; | 2707 | return; |
2708 | } | 2708 | } |
2709 | 2709 | ||
2710 | // move the first object found with this inventory name | 2710 | // move the first object found with this inventory name |
2711 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 2711 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) |
2712 | { | 2712 | { |
2713 | if (inv.Value.Name == inventory) | 2713 | if (inv.Value.Name == inventory) |
2714 | { | 2714 | { |
2715 | found = true; | 2715 | found = true; |
2716 | objId = inv.Key; | 2716 | objId = inv.Key; |
2717 | break; | 2717 | break; |
2718 | } | 2718 | } |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | // check if destination is an avatar | 2721 | // check if destination is an avatar |
2722 | if (World.GetScenePresence(destId) != null) | 2722 | if (World.GetScenePresence(destId) != null) |
2723 | { | 2723 | { |
2724 | // destination is an avatar | 2724 | // destination is an avatar |
2725 | World.MoveTaskInventoryItem(destId, null, m_host, objId); | 2725 | World.MoveTaskInventoryItem(destId, null, m_host, objId); |
2726 | } | 2726 | } |
2727 | else | 2727 | else |
2728 | { | 2728 | { |
2729 | // destination is an object | 2729 | // destination is an object |
2730 | World.MoveTaskInventoryItem(destId, m_host, objId); | 2730 | World.MoveTaskInventoryItem(destId, m_host, objId); |
2731 | } | 2731 | } |
2732 | 2732 | ||
2733 | if (!found) | 2733 | if (!found) |
2734 | llSay(0, "Could not find object " + inventory); | 2734 | llSay(0, "Could not find object " + inventory); |
2735 | } | 2735 | } |
2736 | 2736 | ||