View Single Post
10-06-20, 06:30 AM   #9
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by SDPhantom View Post
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:
  1. hooksecurefunc("Target_Spellbar_AdjustPosition", function(self)
  2.     if self == TargetFrameSpellBar then
  3.         self:ClearAllPoints()
  4.         self:SetPoint("CENTER", UIParent, "CENTER", 0, 40)
  5.     end
  6. 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:
  1. -- Target Castbar  
  2.     hooksecurefunc("Target_Spellbar_AdjustPosition", function(self)
  3.         if self == TargetFrameSpellBar then
  4.             self:ClearAllPoints()
  5.             self:SetPoint("CENTER", UIParent, "CENTER", 0, 40)
  6.         end
  7.     end)
  8.     TargetFrameSpellBar:SetScript("OnShow", Target_Spellbar_AdjustPosition)
  9.     TargetFrameSpellBar:SetScale(2)
  Reply With Quote