ElvUI-Cataclysm / ElvUI_Enhanced-4.3.4

4 stars 0 forks source link

Feature request: Only show Healers Power bars. #5

Open Audisek opened 6 years ago

Audisek commented 6 years ago

Hello. I'd like to see a feature that VuhDo already has. I want an option for Raid Frames to only show the Power bar (mana) for Healer raid members.

For example like this: the Raid frames on the left only show Power bar for the healers (new), and on the right side are Raid frames with Power bars shown for all players (old). image

I've already done this myself with a little hack, but I'd love to see an official implementation. :) (Raid frames have to be Grouped by Group, and Power has to have Style: Inset)

local ra_member = 1
for i=1,5 do
    for j=1,5 do
        if UnitGroupRolesAssigned("raid"..ra_member) == "HEALER"
            then
                _G["ElvUF_RaidGroup"..i.."UnitButton"..j].Power:Show()
                _G["ElvUF_RaidGroup"..i.."UnitButton"..j].Power:SetPoint("BOTTOMLEFT", _G["ElvUF_RaidGroup"..i.."UnitButton"..j].Health, "BOTTOMLEFT",3, 0)
                ra_member = ra_member + 1
            else
                _G["ElvUF_RaidGroup"..i.."UnitButton"..j].Power:Hide()
                ra_member = ra_member + 1
        end 
    end
end
PrOsperity000 commented 6 years ago

Hey man. I'm extremely interested in this configuration option as well. Can you share with me where you implemented this little hack you shared so I could try it myself?

Thanks!

Audisek commented 6 years ago

Well, quickly after I got it working, I found out that it wasn't that easy and it kept bugging out.

It relies on ElvUI always using the correct raid frames for the raid members, so the frames match with the members in the correct order, which sometimes doesn't happen no matter what raid sorting settings you're using, and sometimes it's using one "raid group" with 10 frames instead of 2 "raid groups" with 5 frames each for 10 man raids.

So I've stopped using it myself and just enabled the power bar for everyone again. And I can't remember in which addon I've added the functions that did it, but it's not worth doing it like this anyway.