Skip to content

Commit 02b2959

Browse files
committed
fix for player castbar testmode (#65)
1 parent 1e64e58 commit 02b2959

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ClassicCastbars/core/Frames.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ end
3030

3131
function addon:GetCastbarFrame(unitID)
3232
-- PoolManager:DebugInfo()
33-
if unitID == "player" then return end
33+
if unitID == "player" then return end -- no point returning CastingBarFrame here, we only skin it, not replace it and its events
3434

3535
if activeFrames[unitID] then
3636
return activeFrames[unitID]

ClassicCastbars_Options/TestMode.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function TestMode:SetCastbarMovable(unitID, parent)
112112
return false
113113
end
114114

115-
local castbar = ClassicCastbars:GetCastbarFrame(unitID)
115+
local castbar = unitID == "player" and _G.CastingBarFrame or ClassicCastbars:GetCastbarFrame(unitID)
116116
if unitID ~= "nameplate-testmode" then -- Blizzard broke drag functionality for frames that are anchored to restricted frames in TBC :(
117117
castbar:SetMovable(true)
118118
castbar:SetClampedToScreen(true)
@@ -177,7 +177,7 @@ function TestMode:SetCastbarMovable(unitID, parent)
177177
end
178178

179179
function TestMode:SetCastbarImmovable(unitID)
180-
local castbar = ClassicCastbars:GetCastbarFrame(unitID)
180+
local castbar = unitID == "player" and _G.CastingBarFrame or ClassicCastbars:GetCastbarFrame(unitID)
181181
castbar:Hide()
182182
if castbar.tooltip then
183183
castbar.tooltip:Hide()

0 commit comments

Comments
 (0)