View Single Post
06-13-15, 11:58 AM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I would not suggest to use either of the code. The first one simply doesn't handle the SetPoint hooks, which happens when boss or arena frames appera, or when you enable/disable the Blizzard side bars. The second one is a taint hazzard.

Try this code:

Lua Code:
  1. local moving
  2. hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", function(self)
  3.     if moving then
  4.         return
  5.     end
  6.     moving = true
  7.     self:SetMovable(true)
  8.     self:SetUserPlaced(true)
  9.     self:ClearAllPoints()
  10.     self:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  11.     self:SetScale(1.1) -- optional
  12.     self:SetWidth(300) -- optional
  13.     self:SetHeight(400) -- optional
  14.     self:SetMovable(false)
  15.     moving = nil
  16. end)

Also keep that in mind if the original parent of the frame aka the "MinimapCluster" is not in it's original position, then the client won't be able to bypass secure code for it's children frame aka the "ObjectiveTrackerFrame" and you won't be able to click on the quest items on the frame.

The only solution is that to reset the "MinimapCluster", or to use another 3rd party Minimap addon, which you can reposition securely/properly.

Last edited by Resike : 06-13-15 at 12:02 PM.
  Reply With Quote