View Single Post
12-20-17, 01:14 PM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Lua Code:
  1. -- Player buffs
  2. local b = _G.BuffFrame
  3. b:SetMovable(true)
  4. b:SetUserPlaced(true)
  5. b:ClearAllPoints()
  6. b:SetPoint("TopRight", UIParent, "TopRight", - 204, - 66)
  7. b:SetMovable(false)
  8.  
  9. local moving
  10. hooksecurefunc(BuffFrame, "SetPoint", function(self)
  11.     if moving then
  12.         return
  13.     end
  14.     moving = true
  15.     self:SetMovable(true)
  16.     self:SetUserPlaced(true)
  17.     self:ClearAllPoints()
  18.     self:SetPoint("TopRight", UIParent, "TopRight", - 204, - 66)
  19.     self:SetMovable(false)
  20.     moving = nil
  21. end)
  22.  
  23. -- Consolidated buffs
  24. --[[local c = _G["ConsolidatedBuffs"]
  25. c:ClearAllPoints()
  26. c:SetPoint("TopRight", UIParent, "TopRight", - 204, - 66)
  27. c:SetMovable(true)
  28. c:SetUserPlaced(true)
  29. c:SetMovable(false)
  30. if BuffFrame.numConsolidated == 0 then
  31.     c:Hide()
  32. end]]
  33.  
  34. -- Player debuffs
  35. if DebuffButton_UpdateAnchors then
  36.     hooksecurefunc("DebuffButton_UpdateAnchors", function()
  37.         local d = _G.DebuffButton1
  38.         if d then
  39.             d:SetMovable(true)
  40.             d:SetUserPlaced(true)
  41.             d:ClearAllPoints()
  42.             d:SetPoint("TopRight", BuffFrame, "TopRight", 0, - 180)
  43.             d:SetMovable(false)
  44.         end
  45.     end)
  46. end

Fill the anchors however you would like.
  Reply With Quote