Okay, tested Resike's code on a fresh start. I'm on a live realm, no PTR, in Shadowmoon Valley, tested on my hunter. Pet frame and ToT frame stayed put in several little fights. Didn't try LFD or anything, though. So far so good, though, and I think I like this method a little better.
Lua Code:
local moving
hooksecurefunc(PetFrame, "SetPoint", function(self)
if moving then
return
end
moving = true
self:SetMovable(true)
self:SetUserPlaced(true)
self:ClearAllPoints()
self:SetPoint("CENTER", PlayerFrame, "CENTER", -60, 100)
self:SetMovable(false)
moving = nil
end)
PetFrame:SetPoint("CENTER", PlayerFrame, "CENTER", -60, 100)
hooksecurefunc(TargetFrameToT, "SetPoint", function(self)
if moving then
return
end
moving = true
self:SetMovable(true)
self:SetUserPlaced(true)
self:ClearAllPoints()
self:SetPoint("CENTER", TargetFrame, "CENTER", 60, 100)
self:SetMovable(false)
moving = nil
end)
TargetFrameToT:SetPoint("CENTER", TargetFrame, "CENTER", 60, 100)
Here's what it looks like, and it's working fine.
Thanks again guys!