@@ -16,6 +16,8 @@ local nonLSMBorders = {
16
16
[" Interface\\ CastingBar\\ UI-CastingBar-Border" ] = true ,
17
17
}
18
18
19
+ local isClassic = _G .WOW_PROJECT_ID == _G .WOW_PROJECT_CLASSIC
20
+
19
21
local function GetStatusBarBackgroundTexture (statusbar )
20
22
if statusbar .Background then return statusbar .Background end
21
23
@@ -48,6 +50,27 @@ function addon:GetCastbarFrame(unitID)
48
50
end
49
51
50
52
function addon :SetTargetCastbarPosition (castbar , parentFrame )
53
+ if not isClassic and parentFrame :GetName () == " TargetFrame" then
54
+ if ( parentFrame .haveToT ) then
55
+ if ( parentFrame .buffsOnTop or parentFrame .auraRows <= 1 ) then
56
+ castbar :SetPoint (" TOPLEFT" , parentFrame , " BOTTOMLEFT" , 25 , - 21 )
57
+ else
58
+ castbar :SetPoint (" TOPLEFT" , parentFrame .spellbarAnchor , " BOTTOMLEFT" , 20 , - 15 )
59
+ end
60
+ elseif ( parentFrame .haveElite ) then
61
+ if ( parentFrame .buffsOnTop or parentFrame .auraRows <= 1 ) then
62
+ castbar :SetPoint (" TOPLEFT" , parentFrame , " BOTTOMLEFT" , 25 , - 5 )
63
+ else
64
+ castbar :SetPoint (" TOPLEFT" , parentFrame .spellbarAnchor , " BOTTOMLEFT" , 20 , - 15 )
65
+ end
66
+ else
67
+ if ( (not parentFrame .buffsOnTop ) and parentFrame .auraRows > 0 ) then
68
+ castbar :SetPoint (" TOPLEFT" , parentFrame .spellbarAnchor , " BOTTOMLEFT" , 20 , - 15 )
69
+ else
70
+ castbar :SetPoint (" TOPLEFT" , parentFrame , " BOTTOMLEFT" , 25 , 7 )
71
+ end
72
+ end
73
+ else -- for classic era or unknown parent frame
51
74
local auraRows = parentFrame .auraRows or 0
52
75
53
76
if parentFrame .buffsOnTop or auraRows <= 1 then
@@ -57,6 +80,7 @@ function addon:SetTargetCastbarPosition(castbar, parentFrame)
57
80
castbar :SetPoint (" CENTER" , parentFrame , - 18 , max (min (- 75 , - 43 * auraRows ), - 150 ))
58
81
else
59
82
castbar :SetPoint (" CENTER" , parentFrame , - 18 , max (min (- 75 , - 39 * auraRows ), - 150 ))
83
+ end
60
84
end
61
85
end
62
86
end
0 commit comments