View Single Post
07-25-15, 11:52 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
This line is your problem that causes taint:
Lua Code:
  1. TargetFrameToT.SetPoint = function() end

Instead, you need to hook it securely:
Lua Code:
  1. local newSetPoint = TargetFrameToT.SetPoint
  2. hooksecurefunc(TargetFrameToT, "SetPoint", function()
  3.           newSetPoint(TargetFrameToT, "CENTER",TargetFrame,"CENTER", 60,100)
  4.      end)

That way, every time the game tries to move the ToT frame, your function will fire immediately after and move it right back. (Note: you may wish to add in a check so that it doesn't try to move it while in combat)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote