BlzSetUnitAbilityCooldown
- Parameters
whichUnit unitTarget unit (handle).
abilId integerRawcode of ability.
level integerAbility level.
cooldown realNew cooldown.
- comment
Changes(set) an ability’s cooldown at runtime for a specific unit.
- note
Cooldown is a real, which means that it supports negative and positive numbers with decimals, in this case setting it to negative allows you to reduce an ability’s cooldown.
- note
It does not reduce the cooldown if the ability is currently on CD, it will have its new cooldown after the CD is over though.
- bug
v1.29.2: Crashes when loading a saved game after this function was used on a unit. Probably fixed as of v1.31.1 like with
BlzSetUnitAbilityManaCost.- patch
1.29.2.9231
- Source
- common.j (suggest an edit or discuss on Github)
- return type
nothing- Source code
native BlzSetUnitAbilityCooldown takes unit whichUnit, integer abilId, integer level, real cooldown returns nothing