Hi everyone, I'm writing a small addon which will separate the focus frame castbar from the focus frame but whenever I move the castbar it always goes back to its original y-position, I can move it in the x axis how ever I want and it stays there but not the on the y axis.
Here's a small screenshot to show what I'm talking about, the green arrow points to the focus frame (FocusFrame) and the red to the castbar (FocusFrameSpellBar) which is the one I want to separate.
And then I made a small function which actually moves the bar, it works like I said in the x axis but always "resets" to the same y position as the focus frame frame. I thought that using ClearAllPoints() would unlock it from the focus frame but it's not working.. I think I've narrowed down the problem to one function inside FocusFrame.lua
function Focus_Spellbar_AdjustPosition ()
local yPos = 3;
if ( FocusFrame.debuffTotal > 4 ) then
yPos = 25;
elseif ( TargetofFocusFrame:IsShown() ) then
yPos = 30;
elseif ( FocusFrame.debuffTotal > 0 ) then
yPos = 15
FocusFrameSpellBar:SetPoint("BOTTOM", "FocusFrame", "BOTTOM", 20, -yPos);
I could be wrong but I think this is the only place where the castbar is "adjusted". So I went looking for solutions to get around this and found out about function hooking. Now here's my question, can I prevent this readjusting thing by hooking into this function? Or is there another easier way to do it?