"Gives" the item on the cursor to another unit; results vary by context. If the unit is a friendly player, adds the item to the trade window (opening it if necessary, and placing it in the first available trade slot or the "will not be traded" slot depending on whether the item is soulbound). If the unit is the player's pet and the player is a Hunter, attempts to feed the item to the pet (since this casts the Feed Pet spell, in this case this action is protected and can only be called by the Blizzard user interface). For other units, nothing happens and the item remains on the cursor.
See also Cursor functions.
Signature:
DropItemOnUnit("unit")
or
DropItemOnUnit("name")
Arguments:
unit
- A unit to receive the item (string
, unitID)name
- Name of a unit to receive the item; only valid forplayer
,pet
, and party/raid members (string
)