function ResetCooldown takes unit whichUnit,integer whichAbility returns nothing
local integer level=GetUnitAbilityLevel(whichUnit,whichAbility)
if level>0 then
call UnitRemoveAbility(whichUnit,whichAbility)
call UnitAddAbility(whichUnit,whichAbility)
call SetUnitAbilityLevel(whichUnit,whichAbility,level)
endif
endfunction
defskull, have you tested that? Removing the wait should not bug it, as removing an ability after casting it is common practice for dummy abilities.
You sure JASS has function like that ? 'ResetCooldown' ?Custom script: call ResetCooldown(GetTriggerUnit(),GetSpellAbilityId())
Custom script: call ResetCooldown(udg_MyGlobalVariable,udg_MyAbility)
Custom script: call ResetCooldown(udg_MyGlobalUnit,'A000')
You have to self-adjust the event to "A unit Finishes casting an ability" if the spell such as Flame Strike (requires a cast delay time)