Hello,
I'm writing my own debuff frames and so I'm using the CooldownFrameTemplate to get the cooldown effect that works nicely with other addons as well (namely OmniCC). However, sometimes, some of my frames are not doing the cooldown animation (omnicc still puts time on them though). This persists untill I reload UI, then sometimes the frames work, sometimes others don't, it's driving me nuts.
All other addons that use cooldown frames and animations seem to be completely fine, so I doubt this is some taint issue.
This is how I create my cooldown frames:
Code:
frame.cooldownFrames[i] = CreateFrame("Cooldown", "Dbfs"..i, frame, "CooldownFrameTemplate");
frame.cooldownFrames[i]:ClearAllPoints();
frame.cooldownFrames[i]:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", xoffset, yoffset);
frame.cooldownFrames[i]:SetSize(settings.expandedX, settings.expandedY);
frame.cooldownFrames[i]:SetReverse(true);
frame.cooldownFrames[i]:SetDrawEdge(false);
frame.cooldownFrames[i].texture = frame.cooldownFrames[i]:CreateTexture(nil);
frame.cooldownFrames[i].texture:SetAlpha(1);
frame.cooldownFrames[i].texture:SetAllPoints();
Then, when I want to set a cooldown into one of them, I do it like so:
Code:
cdframe:SetCooldown(debuff.start, debuff.duration);
local texture = cdframe.texture;
texture:SetTexture(debuff.icon);
texture:SetAllPoints();
cdframe:Show();
where debuff.start is expires - duration as returned by UnitDebuff.
Has anyone else faced a similar issue? Am I doing something wrong? All help is appreciated. Thanks.