Commit ed2c4ce3 authored by Tukz's avatar Tukz

There is no castbar on nameplate in classic.

parent 08efbf5d
......@@ -701,11 +701,10 @@ function TukuiUnitFrames:DisplayNameplatePowerAndCastBar(unit, cur, min, max)
local MaxPower = max
local Nameplate = self:GetParent()
local PowerBar = Nameplate.Power
local CastBar = Nameplate.Castbar
local Health = Nameplate.Health
local IsPowerHidden = PowerBar.IsHidden
if (not CastBar:IsShown()) and (CurrentPower and CurrentPower == 0) and (MaxPower and MaxPower == 0) then
if (CurrentPower and CurrentPower == 0) and (MaxPower and MaxPower == 0) then
if (not IsPowerHidden) then
Health:ClearAllPoints()
......
......@@ -73,50 +73,11 @@ function TukuiUnitFrames:Nameplates()
Debuffs.PostCreateIcon = TukuiUnitFrames.PostCreateAura
Debuffs.onlyShowPlayer = C.NamePlates.OnlySelfDebuffs
local CastBar = CreateFrame("StatusBar", "TukuiTargetCastBar", self)
CastBar:SetFrameStrata(self:GetFrameStrata())
CastBar:SetStatusBarTexture(CastTexture)
CastBar:SetFrameLevel(6)
CastBar:Height(C.NamePlates.CastHeight)
CastBar:Point("TOPLEFT", Health, "BOTTOMLEFT", 0, -1)
CastBar:Point("TOPRIGHT", Health, "BOTTOMRIGHT", 0, -1)
CastBar.Background = CastBar:CreateTexture(nil, "BORDER")
CastBar.Background:SetAllPoints(CastBar)
CastBar.Background:SetTexture(CastTexture)
CastBar.Background:SetVertexColor(0.15, 0.15, 0.15)
CastBar.Button = CreateFrame("Frame", nil, CastBar)
CastBar.Button:Size(self:GetHeight())
CastBar.Button:SetTemplate()
CastBar.Button:CreateShadow()
CastBar.Button:Point("TOPRIGHT", self, "TOPLEFT", -6, 0)
CastBar.Icon = CastBar.Button:CreateTexture(nil, "ARTWORK")
CastBar.Icon:SetInside()
CastBar.Icon:SetTexCoord(unpack(T.IconCoord))
CastBar.Text = CastBar:CreateFontString(nil, "OVERLAY")
CastBar.Text:SetFontObject(Font)
CastBar.Text:Point("CENTER", CastBar)
CastBar.Text:SetTextColor(0.84, 0.75, 0.65)
CastBar.Text:SetWidth(C.NamePlates.Width)
CastBar.Text:SetJustifyH("CENTER")
CastBar.PostCastStart = TukuiUnitFrames.CheckInterrupt
CastBar.PostCastInterruptible = TukuiUnitFrames.CheckInterrupt
CastBar.PostCastNotInterruptible = TukuiUnitFrames.CheckInterrupt
CastBar.PostChannelStart = TukuiUnitFrames.CheckInterrupt
CastBar:SetScript("OnShow", TukuiUnitFrames.DisplayNameplatePowerAndCastBar)
CastBar:SetScript("OnHide", TukuiUnitFrames.DisplayNameplatePowerAndCastBar)
local RaidIcon = Health:CreateTexture(nil, "OVERLAY")
RaidIcon:Size(self:GetHeight())
RaidIcon:Point("TOPLEFT", self, "TOPRIGHT", 4, 0)
RaidIcon:SetTexture([[Interface\AddOns\Tukui\Medias\Textures\Others\RaidIcons]])
self.Castbar = CastBar
self.Health = Health
self.Buffs = Buffs
self.Debuffs = Debuffs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment