Originally Posted by SDPhantom
The arguments the new function takes is irrelevant to the taint system. It's merely the fact you're replacing the old one.
Instead of overwriting the function, I would secure hook it.
Lua Code:
hooksecurefunc("Target_Spellbar_AdjustPosition", function(self) if self == TargetFrameSpellBar then self:ClearAllPoints() self:SetPoint("CENTER", UIParent, "CENTER", 0, 40) end end)
This should cause the TargetFrameSpellBar to snap back to the position you set whenever the function runs, without causing taint.
|
Thank You no more errors when a boss frame shows.
Here is the code that works for me:
Lua Code:
-- Target Castbar
hooksecurefunc("Target_Spellbar_AdjustPosition", function(self)
if self == TargetFrameSpellBar then
self:ClearAllPoints()
self:SetPoint("CENTER", UIParent, "CENTER", 0, 40)
end
end)
TargetFrameSpellBar:SetScript("OnShow", Target_Spellbar_AdjustPosition)
TargetFrameSpellBar:SetScale(2)