Skip to content

Commit 49729ac

Browse files
committed
fix/improvement for #85
1 parent 0e4b280 commit 49729ac

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

ClassicCastbars/core/Frames.lua

+14-5
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,11 @@ function ClassicCastbars:SkinPlayerCastbar()
618618
self:SetCastbarFonts(CastingBarFrame, db)
619619

620620
if not isRetail then
621-
hooksecurefunc("CastingBarFrame_OnLoad", ColorPlayerCastbar)
621+
if not CastingBarFrame.CC_ColorIsHooked then
622+
hooksecurefunc("CastingBarFrame_OnLoad", ColorPlayerCastbar)
623+
CastingBarFrame.CC_ColorIsHooked = true
624+
end
625+
622626
C_Timer.After(GetTickTime(), ColorPlayerCastbar)
623627
else
624628
if PlayerCastingBarFrame.isTesting then
@@ -632,22 +636,27 @@ end
632636
if isRetail then
633637
-- Modified code from Classic Frames, some parts might be redundant for us.
634638
-- This is mostly just quick *hacks* to get the player castbar customizations working for retail after patch 10.0.0.
639+
-- Once 'player-castbar-v2' branch is done this will all be removed.
635640
hooksecurefunc(PlayerCastingBarFrame, 'UpdateShownState', function(self)
636641
local db = ClassicCastbars.db and ClassicCastbars.db.player
637642
if not db or not db.enabled then return end
638643

639-
if self.barType ~= "empowered" then
644+
--if self.barType ~= "empowered" then
640645
self:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar")
646+
if self.barType == "empowered" then
647+
self.Spark:SetAtlas(nil)
648+
end
641649
self.Spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
642650
self.Spark:SetSize(32, 32)
643651
self.Spark:ClearAllPoints()
644-
self.Spark:SetPoint("CENTER", 0, 2)
652+
self.Spark:SetPoint("CENTER", self, "LEFT", 0, 0)
653+
self.Spark.offsetY = 0
645654
self.Spark:SetBlendMode("ADD")
646-
if self.channeling then
655+
if self.channeling and self.barType ~= "empowered" then
647656
self.Spark:Hide()
648657
end
649658
ClassicCastbars:SkinPlayerCastbar()
650-
end
659+
--end
651660
end)
652661

653662
hooksecurefunc(PlayerCastingBarFrame, "FinishSpell", function(self)

0 commit comments

Comments
 (0)