UnitAddAbility
- Parameters
-
whichUnit unit
Target unit.
abilityId integer
Abilities' raw code identifier.
- 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)
- patch
-
1.07
- Source
- common.j (suggest an edit or discuss on Github)
- return type
-
boolean
- Source code
-
native UnitAddAbility takes unit whichUnit, integer abilityId returns boolean