UnitDamageTarget

Parameters
whichUnitunit

The source of the damage. To actual deal damage it should be not null.

targetwidget

The target being damaged.

amountreal

How much damage is being dealt.

attackboolean

Consider the damage dealt as being an attack.

rangedboolean

Consider the damage dealt as being from a ranged source.

attackTypeattacktype
damageTypedamagetype
weaponTypeweapontype
comment

Deals damage to target widget from a source unit.

note

For some insight about the different configurations of the different types see this post.

patch

1.17a

Source
common.j (suggest an edit or discuss on Github)
return type
boolean
Source code
native UnitDamageTarget             takes unit whichUnit, widget target, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean