Reply
Thread Tools Display Modes
Unread 03-30-13, 03:19 PM   #1
10leej
A Firelord
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 488
Shows Boss Frames when outside combat

Is there anyway we can show the boss frames out of combat or have some mob attack my warrior for hours at a time?
10leej is offline   Reply With Quote
Unread 03-30-13, 11:50 PM   #2
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,751
I use this code to test my frames:

Code:
local frames = {
    oUFPhanxBoss1,
    oUFPhanxBoss2,
    oUFPhanxBoss3,
    oUFPhanxBoss4,
    oUFPhanxBoss5,
}

function MakeFakes()
    for _, f in ipairs(frames) do
        if not f.__realunit then
            f.__realunit = f:GetAttribute("unit") or f.unit
            f:SetAttribute("unit", "player")
            f.unit = "player"
            f:Show()
        end
    end
end

function UnmakeFakes()
    for _, f in ipairs(frames) do
        if f.__realunit then
            f:SetAttribute("unit", f.__realunit)
            f.unit = f.__realunit
            f.__realunit = nil
            f:Hide()
        end
    end
end
Use "/run MakeFakes()" and "/run UnmakeFakes()" in-game to toggle.

However, this won't help you if you're trying to test the actual bossN unitIDs... if you need to do that, you'll have to find a low-level encounter with multiple bosses where you can just stand there and make changes and reload your UI while the bosses are hitting you.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Shows Boss Frames when outside combat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off