View Single Post
01-27-18, 04:40 PM   #1
tehmoku
A Fallenroot Satyr
Join Date: May 2007
Posts: 27
Moving Boss1TargetFrame without taint

So here's the entirety of my bossframe code

Lua Code:
  1. --[Bossframe scale]
  2. for i = 1, MAX_BOSS_FRAMES do
  3.     local f = _G["Boss"..i.."TargetFrame"]
  4.     f:SetParent(UIParent)
  5.     f:SetScale(1.2)
  6. end
  7.  
  8. --[Lower the gaps]
  9. for i = 2, MAX_BOSS_FRAMES do
  10.     _G["Boss"..i.."TargetFrame"]:SetPoint("TOPLEFT", _G["Boss"..(i-1).."TargetFrame"], "BOTTOMLEFT", 0, 20)
  11. end
  12.  
  13. --[Bossframe castbars]
  14. hooksecurefunc("Target_Spellbar_AdjustPosition", function()
  15.     for i = 1, MAX_BOSS_FRAMES do
  16.         local b = _G["Boss"..i.."TargetFrameSpellBar"]
  17.         b:SetPoint("TOPLEFT", "Boss"..i.."TargetFrame", "BOTTOMLEFT", -10, 29)
  18.     end
  19. end)
  20.  
  21. --[Set Points]
  22. Boss1TargetFrame:ClearAllPoints()
  23. Boss1TargetFrame:SetPoint("TOPRIGHT",UIParent,"TOPRIGHT",-350,-470)
  24. Boss1TargetFrame.SetPoint = function() end

Obviously what matters is the
Lua Code:
  1. Boss1TargetFrame.SetPoint = function() end

I have tried
Lua Code:
  1. hooksecurefunc("UIParent_ManageFramePositions",function()

with no success.

Lua Code:
  1. -- Boss frames - need to move below buffs/debuffs if both right action bars are showing
  2.     local numBossFrames = 0;
  3.     for i = 1, MAX_BOSS_FRAMES do
  4.         if ( _G["Boss"..i.."TargetFrame"]:IsShown() ) then
  5.             numBossFrames = i;
  6.         end
  7.     end
  8.     if ( numBossFrames > 0 ) then
  9.         if ( rightActionBars > 1 ) then
  10.             anchorY = min(anchorY, buffsAnchorY);
  11.         end
  12.         Boss1TargetFrame:SetPoint("TOPRIGHT", "MinimapCluster", "BOTTOMRIGHT", -(CONTAINER_OFFSET_X * 1.3) + 60, anchorY * 1.333);  -- by 1.333 because it's 0.75 scale
  13.         anchorY = anchorY - (numBossFrames * (68 + BOSS_FRAME_CASTBAR_HEIGHT) + BOSS_FRAME_CASTBAR_HEIGHT);
  14.     end

This is what I could find in UIParent.lua regarding SetPoint for boss1.

Anyway, my question is: does anyone have a way to move Boss1TargetFrame and keep it moved without massively tainting everything?
  Reply With Quote