target-castbar: move castbar to avoid overlapping with debuffs

This commit is contained in:
Spit
2025-03-18 18:56:26 +01:00
committed by shagu
parent ebd29584da
commit b7314a767c
+22 -6
View File
@@ -112,14 +112,30 @@ module.enable = function(self)
castbar.texture.icon:Hide()
end
if TargetofTargetFrame and TargetofTargetFrame:IsShown() then
if not castbar.dodged then
castbar:ClearAllPoints()
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -4)
local targetOfTarget = TargetofTargetFrame and TargetofTargetFrame:IsShown()
local debuff11 = TargetFrameDebuff11 and TargetFrameDebuff11:IsShown()
local debuff7 = TargetFrameDebuff7 and TargetFrameDebuff7:IsShown()
local buff1 = TargetFrameBuff1 and TargetFrameBuff1:IsShown()
if targetOfTarget then
castbar:ClearAllPoints()
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -24)
if debuff11 then
castbar:ClearAllPoints()
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -45)
if buff1 then
castbar:ClearAllPoints()
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -65)
end
end
else
if debuff7 then
castbar:ClearAllPoints()
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -24)
castbar.dodged = true
end
elseif castbar.dodged then
castbar:SetPoint("BOTTOM", TargetFrame, "BOTTOM", -12, -4)
castbar.dodged = nil
end
else
castbar:Hide()