API:GetCursorItemInfo

Get source position of item attached to the cursor.

Returns

 * nil:if no item is attached
 * Bag index:if CursorItemType=="bag"

Note
Check CursorItemType to make sure it came from

Related Functions

 * CursorHasItem
 * CursorItemType