There are some cooldowns that can decrease their remaining time thanks to talents or set bonuses.
My intent is to keep track of the remaining cooldown time so that any change in the remaining time is not attributable to the global cooldown.
Does this script have any weaknesses? Are there any points where it could be improved?
if arg4 == UnitName("player")then
local start, duration = GetSpellCooldown(arg9)
if arg10 =="Riptide"then
self.start = start
self.duration = duration
self.endtime = start + duration
self.id = arg9
-- This is the crucial part: is it right? Does this part actually ensure that the change in the
-- remaining cooldown duration is not attributable to the global cooldown?