Can i hijack this thread to ask if it's possible to move the boss unit frames without causing taint - since they don't have the right-click + move option?
Lua Code:
local a = {Boss1TargetFrame:GetPoint()}
Boss1TargetFrame:ClearAllPoints()
Boss1TargetFrame:SetPoint(a[1],a[2],a[3],a[4]-22, a[5]-70)
Boss1TargetFrame.SetPoint = function() end
Lua Code:
hooksecurefunc("TargetFrame_OnEvent", function(self, event)
if (event=="INSTANCE_ENCOUNTER_ENGAGE_UNIT") then
for i = 1, MAX_BOSS_FRAMES do
if ( _G["Boss"..i.."TargetFrame"]:IsShown()) then
numBossFrames = i;
end
end
if (numBossFrames > 0) then
local frame = CreateFrame("Frame")
frame:SetPoint("TOP", MinimapCluster, "BOTTOM", 0, -40)
Boss1TargetFrame:SetParent(frame)
Boss1TargetFrame:ClearAllPoints()
Boss1TargetFrame:SetPoint("TOP", frame, "TOP", 0, 0)
end
end
end)
Lua Code:
local bossParent = CreateFrame("Frame")
bossParent:SetPoint("TOP", MinimapCluster, "BOTTOM", 10, -80)
local HandleFrame = function(baseName)
local frame
if(type(baseName) == 'string') then
frame = _G[baseName]
else
frame = baseName
end
if (frame) then
-- move frame without causing taint (?)
frame:ClearAllPoints()
frame:SetParent(bossParent)
frame:SetPoint("TOP", bossParent, "TOP", 0, 0)
end
end
function MoveTheFuckinBoss(unit)
if(not unit) then return end
if(unit:match'(boss)%d?$' == 'boss') then
local id = unit:match'boss(%d)'
if(id) then
HandleFrame('Boss'..id..'TargetFrame')
else
for i=1, 4 do
HandleFrame(('Boss%dTargetFrame'):format(i))
end
end
end
end
hooksecurefunc("UIParent_ManageFramePositions", MoveTheFuckinBoss)
Trying things like this has either failed to produce results, caused an ADDON_ACTION_BLOCKED error, or both.