mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user