Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
scope CD initializer init
private function ResetNow takes nothing returns boolean
call UnitResetCooldown(GetFilterUnit())
return false
endfunction
private function ResetCooldown takes nothing returns boolean
call GroupEnumUnitsInRect(bj_lastCreatedGroup, bj_mapInitialPlayableArea, function ResetNow)
return false
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t, Condition(function ResetCooldown))
set t = null
endfunction
endscope
scope CD initializer init
private function ResetCooldown takes nothing returns boolean
call UnitResetCooldown(GetTriggerUnit())
return false
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t, Condition(function ResetCooldown))
set t = null
endfunction
endscope
call reset

Events


Unit - A unit Starts effect of ability

Conditions

Actions


Unit Group - Add (Triggering unit) to CDgroup


Timer - Countdown timer as One shot that will expire in 0.00 seconds
reset

Events


Time - timer expires

Conditions

Actions


Unit Group - Pick all units in CDgroup and do Actions



Loop - Actions




Unit - Reset cooldowns for (Picked unit)




Unit Group - Remove (Picked unit) from CDgroup
yeah a global group will work but timer needs to be destroyed also...
function Callrestore takes nothing returns nothing
call UnitResetCooldown(GetEnumUnit())
call GroupRemoveUnit(udg_CDgroup, GetEnumUnit())
endfunction
function Callback takes nothing returns nothing
call ForGroup(udg_CDgroup, function Callrestore)
endfunction
function GetUnit takes nothing returns boolean
if udg_ModeEnabled then
call GroupAddUnit(udg_CDgroup, GetTriggerUnit())
call TimerStart(udg_timer, 0.00, false, function Callback)
endif
return false
endfunction
function InitTrig_ResetCooldown takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(t, Condition(function GetUnit))
set t = null
endfunction
Don't use "null" as an argument in registered event (or any boolexpr). Create a function that returns true; for some odd reason, it creates a permanent leak otherwise. It is more preferable if it has anything but "null".
Null boolexpr leak doesn't exist anymore.I am aware of how Blizzard stated that in the 1.24 patch, but there are some people still claiming it was never changed. I will have a look at this a bit more, if needed.