UnitDropItemTarget

Parameters
whichUnit unit

Target unit.

whichItem item

Handle to item instance.

target widget

Target unit or widget.

comment

Issues an immediate order for the whichUnit to go to target (usually another unit) and give the item to target. If the target has no inventory slots/full inventory, the item is dropped at target's feet.

If the whichUnit cannot reach the target, it will run up to closest location and stop there, without giving the item. If the target is a running unit, whichUnit will follow it to give the item.

Returns:

  • true if item was found in inventory of whichUnit and an order was issued.
  • false if whichUnit/item/widget invalid, whichUnit is paused and cannot take orders etc. Target widget can be a paused unit and will receive the item.
note

See: UnitDropItemSlot, UnitDropItemPoint.

patch

1.17a

Source
common.j
return type
boolean
Source code
native          UnitDropItemTarget      takes unit whichUnit, item whichItem, widget target returns boolean