Bug fix on attachments: don't delete the item from inventory when it's dropped on the ground.
parent
8fc5eda2c9
commit
18bfe58de8
|
@ -375,10 +375,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
}
|
}
|
||||||
part.ParentGroup.DetachToGround();
|
part.ParentGroup.DetachToGround();
|
||||||
|
|
||||||
List<UUID> uuids = new List<UUID>();
|
// If the item is no-copy we need to delete it from inventory
|
||||||
uuids.Add(inventoryID);
|
InventoryItemBase item = m_scene.InventoryService.GetItem(new InventoryItemBase(itemID));
|
||||||
m_scene.InventoryService.DeleteItems(remoteClient.AgentId, uuids);
|
if (item != null && (item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
remoteClient.SendRemoveInventoryItem(inventoryID);
|
{
|
||||||
|
List<UUID> uuids = new List<UUID>();
|
||||||
|
uuids.Add(inventoryID);
|
||||||
|
m_scene.InventoryService.DeleteItems(remoteClient.AgentId, uuids);
|
||||||
|
remoteClient.SendRemoveInventoryItem(inventoryID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnAttach(part.ParentGroup.LocalId, itemID, UUID.Zero);
|
m_scene.EventManager.TriggerOnAttach(part.ParentGroup.LocalId, itemID, UUID.Zero);
|
||||||
|
|
Loading…
Reference in New Issue