OpenMetaverse.InventoryManager.RequestCopyItemFromNotecard C# (CSharp) Method

RequestCopyItemFromNotecard() public method

Request a copy of an asset embedded within a notecard
public RequestCopyItemFromNotecard ( UUID objectID, UUID notecardID, UUID folderID, UUID itemID, ItemCopiedCallback callback ) : void
objectID UUID Usually UUID.Zero for copying an asset from a notecard
notecardID UUID UUID of the notecard to request an asset from
folderID UUID Target folder for asset to go to in your inventory
itemID UUID UUID of the embedded asset
callback ItemCopiedCallback callback to run when item is copied to inventory
return void
        public void RequestCopyItemFromNotecard(UUID objectID, UUID notecardID, UUID folderID, UUID itemID, ItemCopiedCallback callback)
        {
            CopyInventoryFromNotecardPacket copy = new CopyInventoryFromNotecardPacket();
            copy.AgentData.AgentID = _Client.Self.AgentID;
            copy.AgentData.SessionID = _Client.Self.SessionID;

            copy.NotecardData.ObjectID = objectID;
            copy.NotecardData.NotecardItemID = notecardID;

            copy.InventoryData = new CopyInventoryFromNotecardPacket.InventoryDataBlock[1];
            copy.InventoryData[0] = new CopyInventoryFromNotecardPacket.InventoryDataBlock();
            copy.InventoryData[0].FolderID = folderID;
            copy.InventoryData[0].ItemID = itemID;

            _ItemCopiedCallbacks[0] = callback; //Notecards always use callback ID 0

            _Client.Network.SendPacket(copy);
        }