View Single Post
07-25-15, 11:56 AM   #3
Jasmer
A Flamescale Wyrmkin
 
Jasmer's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 122
Originally Posted by Seerah View Post
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)
Thanks, Seerah, I'll try it out. I'd read the function() end was a problem, but then got confused because I'd also read elsewhere to add it to player and target frames to keep them from resetting. They don't cause any taint problems and they've stopped resetting. Is it because they're actually unlockable, then? Also, the pet frame also has the same function() end and no taint problems as far as I can tell. Kind of confused about this.

As for the combat check, I'll see if I can figure it out. Does that mean it'll reset when I'm in combat, or will it stay where I place it?
  Reply With Quote