UnitAddAbility

Parameters
whichUnit unit

Target unit

abilityId integer
comment

Adds the ability to target unit. Can be used to add an ability to any hero. The added ability is level 1 and without a cooldown.

Returns:

  • true if the addition was successful (hero did not have this ability before)
  • false otherwise (hero already has this ability)
return type
boolean
Source code
native UnitAddAbility takes unit whichUnit, integer abilityId returns boolean
Source
unit.j
wc3modding.com
UnitAddAbility