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
This commit is contained in:
Justin Clark-Casey (justincc)
2010-08-23 23:16:48 +01:00
parent 74e5fe5aa9
commit 704a53fb9b
5 changed files with 38 additions and 16 deletions

View File

@@ -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,