View Single Post
09-02-12, 03:58 AM   #13
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by zork View Post
Can you post your final code?
Lua Code:
  1. local function UpdatePoint()
  2.     DurabilityFrame.ignoreFramePositionManager = true
  3.     DurabilityFrame:ClearAllPoints()
  4.     DurabilityFrame:SetParent(Minimap)
  5.     DurabilityFrame:SetPoint("TOPRIGHT",Minimap,"BOTTOMLEFT",-20,-20)
  6. end
  7.  
  8. hooksecurefunc(DurabilityFrame,"SetPoint",function(self,_,parent)
  9.     if parent ~= _G["Minimap"] then
  10.         UpdatePoint()
  11.     end
  12. end)
  13.  
  14. tinsert(TUSUI.Updaters, UpdatePoint)

Edit: I had to wrap this into a frame and run the hook after "PLAYER_ENTERING_WORLD" to prevent some strange WoW client crash.

Last edited by suicidalkatt : 09-02-12 at 08:22 AM.
  Reply With Quote