From 704a53fb9bfeb945fa25f7367c631698dea5ae89 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 23 Aug 2010 23:16:48 +0100 Subject: Fix bug in llGiveInventory() where items were disappearing on relog This was a regression - the code to look up the correct type folder was no longer being called if items were added without a parent folder set This may have been broken since commit bd49985a on 2010-05-02 --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b6eddb1..dc43e45 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3844,18 +3844,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (World.GetScenePresence(destId) != null) { // destination is an avatar - InventoryItemBase agentItem = - World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); + InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); if (agentItem == null) return; byte[] bucket = new byte[17]; bucket[0] = (byte)assetType; - byte[] objBytes = objId.GetBytes(); + byte[] objBytes = agentItem.ID.GetBytes(); Array.Copy(objBytes, 0, bucket, 1, 16); - Console.WriteLine("Giving inventory"); GridInstantMessage msg = new GridInstantMessage(World, m_host.UUID, m_host.Name+", an object owned by "+ resolveName(m_host.OwnerID)+",", destId, -- cgit v1.1