After patch 7.0 this little timer under my castbar stopped working.
Could some kind person help me fix this script?
Lua Code:
--Cast bar timer
CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil);
CastingBarFrame.timer:SetFont(STANDARD_TEXT_FONT,12,"OUTLINE");
CastingBarFrame.timer:SetPoint("TOP", CastingBarFrame, "BOTTOM", 0, -3);
CastingBarFrame.update = .1;
hooksecurefunc("CastingBarFrame_OnUpdate", function(self, elapsed)
if not self.timer then return end
if self.update and self.update < elapsed then
if self.casting then
self.timer:SetText(format("%2.1f/%1.1f", max(self.maxValue - self.value, 0), self.maxValue))
elseif self.channeling then
self.timer:SetText(format("%.1f", max(self.value, 0)))
else
self.timer:SetText("")
end
self.update = .1
else
self.update = self.update - elapsed
end
end)
Thank you in advance.