CastingBarFrame:ClearAllPoints()
CastingBarFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -295)-- 시전바 위치 수정
CastingBarFrame.SetPoint = function() end
CastingBarFrame:SetScale(1.2)-- 시전바 크기
PetCastingBarFrame:SetScale(1.2)
CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
CastingBarFrame.timer:SetFont(STANDARD_TEXT_FONT, 14, "OUTLINE")
CastingBarFrame.timer:SetPoint("LEFT", CastingBarFrame, "LEFT", 3, 3)
CastingBarFrame.timer.maxValue = CastingBarFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
CastingBarFrame.timer.maxValue:SetFont(STANDARD_TEXT_FONT, 14, "OUTLINE")
CastingBarFrame.timer.maxValue:SetPoint("RIGHT", CastingBarFrame, "RIGHT", -1, 3)
CastingBarFrame.update = .1;
CastingBarFrame.Icon:Show()-- 아이콘 보이기
CastingBarFrame.Icon:SetSize(19, 19)-- 아이콘 크기
CastingBarFrame.Border:SetTexture("InterfaceCastingBarUI-CastingBar-Border-Small")
CastingBarFrame.Flash:SetTexture("InterfaceCastingBarUI-CastingBar-Flash-Small")
local function CastingBarFrame_OnUpdate_Hook(self, elapsed)
if not self.timer then return end
if self.update and self.update < elapsed then
if self.timer.maxValue then self.timer.maxValue:SetText(format("|cffffff00%1.1f", self.maxValue)) end
if self.casting then
self.timer:SetText(format("|cffffff00%1.1f", max(self.maxValue - self.value, 0)))
elseif self.channeling then
self.timer:SetText(format("|cffffff00%.1f", max(self.value, 0)))
else
self.timer:SetText("")
if self.timer.maxValue then self.timer.maxValue:SetText("") end
end
self.update = .1
else
self.update = self.update - elapsed
end
end
CastingBarFrame:HookScript("OnUpdate", CastingBarFrame_OnUpdate_Hook)