Код:
	CastingBarFrame:ClearAllPoints()
CastingBarFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -290)
CastingBarFrame.SetPoint = function()end
local fcb = CreateFrame("Frame", nil, UIParent)
fcb:SetSize(36, 36)
fcb:SetPoint("RIGHT", CastingBarFrame, "LEFT", -5, 7)
local icon = fcb:CreateTexture(nil, "OVERLAY")
icon:SetAllPoints()
icon:SetTexture(nil)
local timerText = fcb:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
timerText:SetPoint("LEFT", CastingBarFrame, "RIGHT", 5, 2)
timerText:SetTextColor(1, 1, 1)
timerText:SetFont("Fonts\\FRIZQT__.TTF", 13, "OUTLINE")
timerText:Hide()
fcb.casting = false
fcb.castType = nil
fcb.castStartTime = 0
fcb.castEndTime = 0
fcb.castDuration = 0
fcb.updateElapsed = 0
local function UpdateCastTime(self, elapsed)
	self.updateElapsed = self.updateElapsed + elapsed
	if self.updateElapsed < 0.05 then return end
	self.updateElapsed = 0
	if self.casting and self.castStartTime and self.castDuration > 0 then
		local elapsedTime = math.min(((GetTime() * 1000) - self.castStartTime) / 1000, self.castDuration / 1000)
		local totalTime = self.castDuration / 1000
		timerText:SetText(string.format("%.1f / %.1f", elapsedTime, totalTime))
	else
		timerText:SetText("")
	end
end
local function OnCastEvent(self, event, unit)
	if unit ~= "player" then return end
	if event == "UNIT_SPELLCAST_START" or event == "UNIT_SPELLCAST_CHANNEL_START" then
		local spell, _, _, _, startTime, endTime
		if event == "UNIT_SPELLCAST_START" then
			spell, _, _, _, startTime, endTime = UnitCastingInfo("player")
			self.castType = "cast"
		else
			spell, _, _, _, startTime, endTime = UnitChannelInfo("player")
			self.castType = "channel"
		end
		if spell and startTime and endTime then
			icon:SetTexture(GetSpellTexture(spell))
			self.casting = true
			self.castStartTime = startTime
			self.castEndTime = endTime
			self.castDuration = endTime - startTime
			timerText:Show()
			fcb:Show()
			self:SetScript("OnUpdate", UpdateCastTime)
		end
	elseif event == "UNIT_SPELLCAST_DELAYED" or event == "UNIT_SPELLCAST_CHANNEL_UPDATE" then
		local startTime, endTime
		if self.castType == "cast" then
			_, _, _, _, startTime, endTime = UnitCastingInfo("player")
		elseif self.castType == "channel" then
			_, _, _, _, startTime, endTime = UnitChannelInfo("player")
		else
			return
		end
		if startTime and endTime then
			self.castStartTime = startTime
			self.castEndTime = endTime
			self.castDuration = endTime - startTime
		end
	elseif event == "UNIT_SPELLCAST_STOP"
		or event == "UNIT_SPELLCAST_FAILED"
		or event == "UNIT_SPELLCAST_INTERRUPTED"
		or event == "UNIT_SPELLCAST_CHANNEL_STOP"
	then
		icon:SetTexture(nil)
		timerText:Hide()
		fcb:Hide()
		self.casting = false
		self:SetScript("OnUpdate", nil)
	end
end
for _,eventName in ipairs({"UNIT_SPELLCAST_START","UNIT_SPELLCAST_CHANNEL_START","UNIT_SPELLCAST_STOP","UNIT_SPELLCAST_FAILED","UNIT_SPELLCAST_INTERRUPTED","UNIT_SPELLCAST_CHANNEL_STOP","UNIT_SPELLCAST_DELAYED","UNIT_SPELLCAST_CHANNEL_UPDATE",})do fcb:RegisterEvent(eventName)end
fcb:SetScript("OnEvent", OnCastEvent)
fcb:Hide()
local function CreateCastTimeText(castbar)
	if not castbar then return nil end
	if castbar.castTimeText then return castbar.castTimeText end
	local text = castbar:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
	text:SetPoint("LEFT", castbar, "RIGHT", 3, 2)
	text:SetTextColor(1, 1, 1)
	text:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE")
	text:SetText("")
	return text
end
local targetBarText = CreateCastTimeText(TargetFrameSpellBar)
local focusBarText = CreateCastTimeText(FocusFrameSpellBar)
TargetFrameSpellBar:SetScale(1.125)
TargetFrameSpellBar:ClearAllPoints()
TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, -220)
TargetFrameSpellBar.SetPoint = function()end
FocusFrameSpellBar:SetPoint("BOTTOM", FocusFrame, "TOP", -15, -7)
FocusFrameSpellBar.SetPoint = function()end
local updater = CreateFrame("Frame")
updater.elapsed = 0
updater:SetScript("OnUpdate", function(self, elapsed)
	self.elapsed = self.elapsed + elapsed
	if self.elapsed < 0.05 then return end
	self.elapsed = 0
	local function UpdateUnitCastTime(unit, text)
		if not text then return end
		local spell, _, _, _, startTime, endTime = UnitCastingInfo(unit)
		if not spell then spell, _, _, _, startTime, endTime = UnitChannelInfo(unit)end
		if spell and startTime and endTime then local current = math.min((GetTime()*1000 - startTime) / 1000, (endTime - startTime) / 1000)local max = (endTime - startTime) / 1000 text:SetText(string.format("%.1f / %.1f", current, max))else text:SetText("")end
	end
	UpdateUnitCastTime("target", targetBarText)UpdateUnitCastTime("focus", focusBarText)
end)