aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs38
1 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 57c1e02..1d4a72e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -36,6 +36,7 @@ using Axiom.Math;
36using libsecondlife; 36using libsecondlife;
37using OpenSim; 37using OpenSim;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Communications.Cache;
39using OpenSim.Region.Environment; 40using OpenSim.Region.Environment;
40using OpenSim.Region.Environment.Interfaces; 41using OpenSim.Region.Environment.Interfaces;
41using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 42using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
@@ -4226,10 +4227,45 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4226 NotImplemented("llGroundRepel"); 4227 NotImplemented("llGroundRepel");
4227 } 4228 }
4228 4229
4230 private LLUUID GetTaskInventoryItem(string name)
4231 {
4232 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
4233 {
4234 if(inv.Value.Name == name)
4235 return inv.Key;
4236 }
4237 return LLUUID.Zero;
4238 }
4239
4229 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4240 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4230 { 4241 {
4231 m_host.AddScriptLPS(1); 4242 m_host.AddScriptLPS(1);
4232 NotImplemented("llGiveInventoryList"); 4243
4244 LLUUID destID;
4245 if(!LLUUID.TryParse(destination, out destID))
4246 return;
4247
4248 List<LLUUID> itemList = new List<LLUUID>();
4249
4250 foreach (Object item in inventory.Data)
4251 {
4252 LLUUID itemID;
4253 if(LLUUID.TryParse(item.ToString(), out itemID))
4254 {
4255 itemList.Add(itemID);
4256 }
4257 else
4258 {
4259 itemID = GetTaskInventoryItem(item.ToString());
4260 if(itemID != LLUUID.Zero)
4261 itemList.Add(itemID);
4262 }
4263 }
4264
4265 if(itemList.Count == 0)
4266 return;
4267
4268 m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList);
4233 } 4269 }
4234 4270
4235 public void llSetVehicleType(int type) 4271 public void llSetVehicleType(int type)