I use this for testing my layout. Rather than overwriting global functions and tainting your frames, it just tells the frames to display the player unit, so you can test with real health values, auras, etc. Just type the command again to put them back to their original state.
Code:
local frames = {
"oUFPhanxBoss1",
"oUFPhanxBoss2",
"oUFPhanxBoss3",
"oUFPhanxBoss4",
"oUFPhanxBoss5",
}
local function toggle(f)
if f.__realunit then
f:SetAttribute("unit", f.__realunit)
f.unit = f.__realunit
f.__realunit = nil
f:Hide()
else
f.__realunit = f:GetAttribute("unit") or f.unit
f:SetAttribute("unit", "player")
f.unit = "player"
f:Show()
end
end
SLASH_OUFPHANXTEST1 = "/otest"
SlashCmdList.OUFPHANXTEST = function()
for i = 1, #frames do
toggle(_G[frames[i]])
end
end