Hello,
Not sure if this is a bug but the newer BlzUnitCancelTimedLife native function kills the unit rather than just aborting the timer and this is not very useful because it could already be done before by removing the buff of the timed life.
Introduction:
With the UnitApplyTimedLife native function, one can add an expiration timer to a unit like summoned units use, which kills the unit after a given amount of game time and displays a decreasing bar in its user interface. From a mapmaking perspective, there has been the desire to be able to abort the timer, avoiding the unitâs death, to change the duration, change the caption etc. afterwards but, before, there was only the UnitPauseTimedLife native function to stop/resume an expiration timer and to finish the timer prematurely by removing the buff with UnitRemoveAbility(unit, buffId), which also kills the unit.
Observed on: 1.33.0.19308
Steps:
call UnitApplyTimedLife on a unit (for example, use the âBTLFâ generic timed life buff)
call BlzUnitCancelTimedLife on the same unit
Expected:
The buff and timer are removed, the timed life display in the unit user interface vanishes, revealing again what it might have hidden like the experience bar. The unit keeps living.
Actual:
The unit dies.
Additional information:
Timed life buffs can be interleaved, i.e., if you apply a âHealing Wardâ buff first, then âWater Elementalâ, the user interface will still display âHealing Wardâ with the corresponding bar, even if the âWater Elementalâ one will be the first one to expire, but the unit will die on any timer that expires first, which may be a bug/issue in itself. You can even add multiple timers for the same buff.
Thus, if the interleaving capability is intended, it maybe should be considered in methods to abort the timed life, i.e., aborting individual timers instead of every timer.
However, it would be useful enough to have a native function to abort every timer, as interleavings where only one timed life is displayed could be taken care of by the mapmaker. In mapmaking, the value here is mostly to display the bar in the user interface, not to have the unit dying upon expiration.