Originally Posted by
ashin
I got inspiration from a fellow poster who linked this UI:
http://www.youtube.com/watch?v=OaAFf...layer_embedded
Specifically, setting an animation when Debuffs fall off the target. Here are my questions / requests in order of importance:
1. I have my debuffs setup so they slide/fade to the left when they drop off the target. Makes it impossible for me to miss. But they play this animation even if I just change targets, or if my target dies. So if I am tab-dotting, this animation is actually really obnoxious, because every single time I change targets, I will see the slide. Is there a way to change this behavior so that, at a minimum, the animation is NOT triggered by changing targets??
2. Does anyone know the LUA code this guy used to get his WA to show remaining stacks instead of remaining time? Much more helpful.
3. Is there any way, or could a feature be added, so that the "end" animation begins x seconds prior to the aura ending? It would be cool if the slide could start before the debuff drops off.
personally i dont know much of the coding that went into that, the person who worked on those exports for weakauras is Evn who is also a poster here on mmo-champion. You can probably look at the coding Evn [if you dont want the code posted i'll happily edit it out of the post] did for one of the dots and see if you can adapt it:
Code:
function ()
local dot = {
name = "Vampiric Touch",
duration = 15.0,
interval = 3.0,
}
WA_DOTS = WA_DOTS or {}
WA_DOTS[dot.name] = WA_DOTS[dot.name] or {}
local stats = WA_DOTS[dot.name][UnitGUID("target")] or {haste = 0}
local _, _, _, _, _, duration, expires, _ = UnitAura("target", dot.name, nil, "PLAYER|HARMFUL")
expires = expires or 0
duration = duration or 0
local time_left = expires - GetTime()
local percent = floor((time_left / duration) * 100)
-- calculate total number of ticks.
local total_ticks = dot.duration / (dot.interval / (1 + (stats.haste / 100)))
if (floor(total_ticks * 10) - (10* floor(total_ticks)) >= 5) then
total_ticks = ceil(total_ticks)
else
total_ticks = floor(total_ticks)
end
-- ticks_per_second= (duration / ticks)
local ticks_per_second = duration / total_ticks
-- ticks_left = ceil(time_left / ticks_per_second)
local ticks_left = ceil(time_left / ticks_per_second)
if ticks_left < 0 then
ticks_left = 0
end
return string.format("%d", ticks_left or 0)
end