WoW API: DropItemOnUnit

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API DropItemOnUnit to API DropItemOnUnit without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < DropItemOnUnit

Drops an item from the cursor onto the specified target. Can be used to initiate a trade session (though see Trade functions) or feeding pets.

DropItemOnUnit(unit);

Parameters[edit]

Arguments[edit]

unit
UnitId - Unit to which you want to give the item on the cursor.

Example[edit]

if ( CursorHasItem() ) then
  DropItemOnUnit("pet");
end;

Result[edit]

Item is dropped from cursor and given to the player's pet.