Hi,
I have tried the SDPhantom code to fix an issue I got since long time very similar to the one is having cokedrivers.
I had this code in my addon:
Lua Code:
TargetFrameSpellBar:ClearAllPoints()
TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER",0,-30)
TargetFrameSpellBar.SetPoint = function() end
TargetFrameSpellBar:SetScale(2.0)
TargetFrameSpellBar.Icon:SetAlpha(0)
TargetFrameSpellBar.BorderShield:SetAlpha(0)
The position of the target casting bar is correct but I got one error often when I start a (multi)boss .
If I remove this code and I use this:
Lua Code:
hooksecurefunc("Target_Spellbar_AdjustPosition", function(self)
if self == TargetFrameSpellBar then
self:ClearAllPoints()
self:SetPoint("CENTER", UIParent, "CENTER", 0, -30)
-- self.SetPoint = function() end
self:SetScale(2.0)
self.Icon:SetAlpha(0)
self.BorderShield:SetAlpha(0)
end
end)
When castbar appear for the first time it is in the wrong place but in the middle of the cast it goes in center position as I wanted.
The next castbars are put in the right position always.
If I use this:
Lua Code:
self.SetPoint = function() end
No castbar appears (probably because wow doesn't show any un-anchored frame).
Here is a demo:
https://streamable.com/2vi6su
Any idea ?
Thanks for any help.