diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d2a15aacea..41703cd954 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2986,7 +2986,36 @@ namespace OpenSim.Region.ScriptEngine.Common public string llRequestInventoryData(string name) { m_host.AddScriptLPS(1); - NotImplemented("llRequestInventoryData"); + foreach (TaskInventoryItem item in m_host.TaskInventory.Values) + { + if (item.Type == 3 && item.Name == name) + { + LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( + m_localID, m_itemID, item.AssetID.ToString()); + + LLVector3 region = new LLVector3( + World.RegionInfo.RegionLocX * Constants.RegionSize, + World.RegionInfo.RegionLocY * Constants.RegionSize, + 0); + + World.AssetCache.GetAsset(item.AssetID, + delegate(LLUUID i, AssetBase a) + { + AssetLandmark lm = new AssetLandmark(a); + + float rx = (uint)(lm.RegionHandle >> 32); + float ry = (uint)lm.RegionHandle; + region = lm.Position + new LLVector3(rx, ry, 0) - region; + + string reply = region.ToString(); + m_ScriptEngine.m_ASYNCLSLCommandManager. + m_Dataserver.DataserverReply(i.ToString(), + reply); + }, false); + + return tid.ToString(); + } + } return String.Empty; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d7633d8b76..17e825364f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2917,10 +2917,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { AssetLandmark lm = new AssetLandmark(a); - region += lm.Position; + float rx = (uint)(lm.RegionHandle >> 32); + float ry = (uint)lm.RegionHandle; + region = lm.Position + new LLVector3(rx, ry, 0) - region; string reply = region.ToString(); - AsyncCommands. DataserverPlugin.DataserverReply(i.ToString(), reply);