diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index a9d1309..366b20c 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -4374,10 +4374,45 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4374 | NotImplemented("llGroundRepel"); | 4374 | NotImplemented("llGroundRepel"); |
4375 | } | 4375 | } |
4376 | 4376 | ||
4377 | private LLUUID GetTaskInventoryItem(string name) | ||
4378 | { | ||
4379 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
4380 | { | ||
4381 | if(inv.Value.Name == name) | ||
4382 | return inv.Key; | ||
4383 | } | ||
4384 | return LLUUID.Zero; | ||
4385 | } | ||
4386 | |||
4377 | public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) | 4387 | public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) |
4378 | { | 4388 | { |
4379 | m_host.AddScriptLPS(1); | 4389 | m_host.AddScriptLPS(1); |
4380 | NotImplemented("llGiveInventoryList"); | 4390 | |
4391 | LLUUID destID; | ||
4392 | if(!LLUUID.TryParse(destination, out destID)) | ||
4393 | return; | ||
4394 | |||
4395 | List<LLUUID> itemList = new List<LLUUID>(); | ||
4396 | |||
4397 | foreach (Object item in inventory.Data) | ||
4398 | { | ||
4399 | LLUUID itemID; | ||
4400 | if(LLUUID.TryParse(item.ToString(), out itemID)) | ||
4401 | { | ||
4402 | itemList.Add(itemID); | ||
4403 | } | ||
4404 | else | ||
4405 | { | ||
4406 | itemID = GetTaskInventoryItem(item.ToString()); | ||
4407 | if(itemID != LLUUID.Zero) | ||
4408 | itemList.Add(itemID); | ||
4409 | } | ||
4410 | } | ||
4411 | |||
4412 | if(itemList.Count == 0) | ||
4413 | return; | ||
4414 | |||
4415 | m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList); | ||
4381 | } | 4416 | } |
4382 | 4417 | ||
4383 | public void llSetVehicleType(int type) | 4418 | public void llSetVehicleType(int type) |