WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   arena frames in MoP (https://www.wowinterface.com/forums/showthread.php?t=45528)

Dawn 12-29-12 09:00 AM

arena frames in MoP
 
I figured blizzards arena frames show up when you enter the arena, revealing the enemy team composition.

Been using oUF for arena frames since forever, but they only show up once the "doors open". Which is kind of a big deal aka disadvantage.

So I kinda asked myself how do I mange to get the same "feature" with my oUF frames?! Anyone got some insight on this? Do I have to spawn them in a different way or ... ?


€: Side-question; are there still Main Tank frames or are they gone?

Monolit 12-30-12 02:07 AM

I just spawn sort of 'ghost' frames that mimic my arena frames style
https://github.com/Strigoy/MonoUI/bl....lua#L339-L416
and monitor ARENA_PREP_OPPONENT_SPECIALIZATIONS event to get the class/specialization, then hide them when ARENA_OPPONENT_UPDATE fires (the actual arena frames appear).

MT frames seem to function as they used to, for me at least.

Phanx 12-30-12 04:18 AM

Quote:

Originally Posted by Dawn (Post 271125)
€: Side-question; are there still Main Tank frames or are they gone?

It's still possible, but as always, it requires the main tanks to be marked as main tanks in the Blizzard raid panel, and I could probably count on my fingers the number of times I've seen a raid actually do that in the last 8 years.

Dawn 12-30-12 07:41 AM

@Monolit
Thanks I'll look into this. To bad one can't test this kind of stuff in skirmish arena anymore. :(


Quote:

Originally Posted by Phanx (Post 271147)
It's still possible, but as always, it requires the main tanks to be marked as main tanks in the Blizzard raid panel, and I could probably count on my fingers the number of times I've seen a raid actually do that in the last 8 years.

I was used to set MTs via RightClick on the raidframe member, since that option seems gone and I have the Blizz raidframe Manager hidden... Thanks for the clear up. :)

Rainrider 12-30-12 10:53 AM

Quote:

Originally Posted by Dawn (Post 271154)
I was used to set MTs via RightClick on the raidframe member, since that option seems gone and I have the Blizz raidframe Manager hidden... Thanks for the clear up. :)

https://github.com/haste/oUF/issues/169

You could still set them via /mt or /maintank. In LFR the first tank (by raid id) is set as mt automatically I believe. You could also implement ora3 support back in the days, don't know the status of this now.

Dawn 12-30-12 05:54 PM

@haste
Are there any plans to let the oUF arena frames handle the spawning like blizzards arena frames do by default, aka they show up during preparation?

haste 12-31-12 09:39 AM

It is possible to re-use the oUF arena frames as preparation frames, but it will require some special handling as none of the elements will update correctly then.

I could add a system to handle this, then let the layouts just do the updating themselves. It would be similar to what Monolit does, but with the actual frames instead.

Callback would probably be something like:
Lua Code:
  1. function(frame, id, spec, class)
  2. end

Not really sure how sane this would be in practice.

Coldkil 03-15-13 07:59 AM

Wrking with my UI i encountered the same problem - arena frames were very basic, mostly because i don't pvp much.

Hence after the request of improving them, i found myself in need to write down the code from scratch for preparation arena frames.

really hope for a future oUF support, that would make things a lot better ;)

haste 03-15-13 08:14 AM

Not sure if I still have my proof of concept for this anymore. Creating a issue over at GitHub so it won't get forgotten again.

Dawn 06-02-13 01:25 PM

Would still like to have this working properly.

I tried the "mono way" but it just didn't do anything. Not sure what's going on there. Couldn't get it to work. And not getting an error isn't really helping to find out what's wrong, either.

so ...

*bump* :)

Btw, this thread has almost 2k views. It's needed! :D

zork 06-06-13 02:30 AM

I may have an idea.

*edit*
Ok bad idea. That is the arena panel.

Dawn 06-06-13 08:32 AM

Even showing the default arena frames until the gate opens would be okay for me. This needs a solution, please, please, did i say... please? :)

Caellian 06-16-13 04:29 AM

Arena prep ghost frames working
 
Quote:

Originally Posted by Dawn (Post 279283)
Even showing the default arena frames until the gate opens would be okay for me. This needs a solution, please, please, did i say... please? :)

Working arena prep ghost frames:

Code:

                local arenaprep = {}
                for i = 1, 5 do
                        arenaprep[i] = CreateFrame("Frame", "oUF_Caellian_ArenaPrep"..i, UIParent)
                        arenaprep[i]:SetAllPoints(_G["oUF_Arena"..i])

                        arenaprep[i].Health = CreateFrame("StatusBar", nil, arenaprep[i])
                        arenaprep[i].Health:SetAllPoints()
                        arenaprep[i].Health:SetStatusBarTexture(caelMedia.files.statusBarCb)

                        arenaprep[i].Spec = oUF_Caellian.SetFontString(arenaprep[i].Health, oUF_Caellian.config.font, 9)
                        arenaprep[i].Spec:SetPoint("CENTER")

                        arenaprep[i].FrameBackdrop = CreateFrame("Frame", nil, arenaprep[i])
                        arenaprep[i].FrameBackdrop:SetFrameLevel(arenaprep[i]:GetFrameLevel() - 1)
                        arenaprep[i].FrameBackdrop:SetPoint("TOPLEFT", pixelScale(-3), pixelScale(3))
                        arenaprep[i].FrameBackdrop:SetPoint("BOTTOMRIGHT", pixelScale(3), pixelScale(-3))
                        arenaprep[i].FrameBackdrop:SetFrameStrata("MEDIUM")
                        arenaprep[i].FrameBackdrop:SetBackdrop(caelMedia.backdropTable)
                        arenaprep[i].FrameBackdrop:SetBackdropColor(0, 0, 0, 0)
                        arenaprep[i].FrameBackdrop:SetBackdropBorderColor(0, 0, 0)

                        arenaprep[i]:Hide()
                end

                local arenaprepupdate = CreateFrame("Frame", nil, UIParent)
                arenaprepupdate:RegisterEvent("PLAYER_LOGIN")
                arenaprepupdate:RegisterEvent("PLAYER_ENTERING_WORLD")
                arenaprepupdate:RegisterEvent("ARENA_OPPONENT_UPDATE")
                arenaprepupdate:RegisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS")
                arenaprepupdate:SetScript("OnEvent", function(self, event)
                        if event == "PLAYER_LOGIN" then
                                for i = 1, 5 do
                                        arenaprep[i]:SetAllPoints(_G["oUF_Arena"..i])
                                end
                        elseif event == "ARENA_OPPONENT_UPDATE" then
                                for i = 1, 5 do
                                        arenaprep[i]:Hide()
                                end
                        else
                                local numOpps = GetNumArenaOpponentSpecs()

                                if numOpps > 0 then
                                        for i = 1, 5 do
                                                local frame = arenaprep[i]

                                                if i <= numOpps then
                                                        local opponentSpec = GetArenaOpponentSpec(i)
                                                        local _, spec, class = nil, "UNKNOWN", "UNKNOWN"

                                                        if opponentSpec and opponentSpec > 0 then
                                                                _, spec, _, _, _, _, class = GetSpecializationInfoByID(opponentSpec)
                                                        end

                                                        frame.Health:SetStatusBarColor(0.17, 0.17, 0.24)

                                                        if class and spec then
                                                                local color = RAID_CLASS_COLORS[class]

                                                                if color then
                                                                        frame.Spec:SetFormattedText("|cff%02x%02x%02x%s|r", color.r * 255, color.g * 255, color.b * 255, LOCALIZED_CLASS_NAMES_MALE[class].."  -  "..spec)
                                                                else
                                                                        frame.Spec:SetText(spec.."  -  "..LOCALIZED_CLASS_NAMES_MALE[class])
                                                                end

                                                                frame:Show()
                                                        end
                                                else
                                                        frame:Hide()
                                                end
                                        end
                                else
                                        for i = 1, 5 do
                                                arenaprep[i]:Hide()
                                        end
                                end
                        end
                end)
        end
end)


Dawn 06-16-13 05:01 PM

Thanks, figured it out when you updated your layout a couple of days ago. Not quite sure why it didn't work before, but works fine now. :)

Code:

                local arenaprep = {}
                for i = 1, 5 do
                        arenaprep[i] = CreateFrame("Frame", "oUF_Ghost_ArenaPrep"..i, UIParent)
                        arenaprep[i]:SetAllPoints(_G["oUF_Arena"..i])

                        arenaprep[i].Health = CreateFrame("StatusBar", nil, arenaprep[i])
                        arenaprep[i].Health:SetAllPoints()
                        arenaprep[i].Health:SetStatusBarTexture(cfg.HPtex)

                        arenaprep[i].Spec = SetFontStringAP(arenaprep[i].Health, cfg.RaidFont, 9)
                        arenaprep[i].Spec:SetPoint("CENTER")

                        arenaprep[i].FrameBackdrop = CreateFrame("Frame", nil, arenaprep[i])
                        arenaprep[i].FrameBackdrop:SetFrameLevel(arenaprep[i]:GetFrameLevel() - 1)
                        arenaprep[i].FrameBackdrop:SetPoint("TOPLEFT", -1,1)
                        arenaprep[i].FrameBackdrop:SetPoint("BOTTOMRIGHT", 1,-1)
                        arenaprep[i].FrameBackdrop:SetFrameStrata("MEDIUM")
                        arenaprep[i].FrameBackdrop:SetBackdrop(backdrop)
                        arenaprep[i].FrameBackdrop:SetBackdropColor(0, 0, 0, 0)
                        arenaprep[i].FrameBackdrop:SetBackdropBorderColor(0, 0, 0)

                        arenaprep[i]:Hide()
                end

                local arenaprepupdate = CreateFrame("Frame", nil, UIParent)
                arenaprepupdate:RegisterEvent("PLAYER_LOGIN")
                arenaprepupdate:RegisterEvent("PLAYER_ENTERING_WORLD")
                arenaprepupdate:RegisterEvent("ARENA_OPPONENT_UPDATE")
                arenaprepupdate:RegisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS")
                arenaprepupdate:SetScript("OnEvent", function(self, event)
                        if event == "PLAYER_LOGIN" then
                                for i = 1, 5 do
                                        arenaprep[i]:SetAllPoints(_G["oUF_Arena"..i])
                                end
                        elseif event == "ARENA_OPPONENT_UPDATE" then
                                for i = 1, 5 do
                                        arenaprep[i]:Hide()
                                end
                        else
                                local numOpps = GetNumArenaOpponentSpecs()

                                if numOpps > 0 then
                                        for i = 1, 5 do
                                                local frame = arenaprep[i]

                                                if i <= numOpps then
                                                        local opponentSpec = GetArenaOpponentSpec(i)
                                                        local _, spec, class = nil, "UNKNOWN", "UNKNOWN"

                                                        if opponentSpec and opponentSpec > 0 then
                                                                _, spec, _, _, _, _, class = GetSpecializationInfoByID(opponentSpec)
                                                        end

                                                        frame.Health:SetStatusBarColor(0.17, 0.17, 0.24)

                                                        if class and spec then
                                                                local color = RAID_CLASS_COLORS[class]

                                                                if color then
                                                                        frame.Spec:SetFormattedText("|cff%02x%02x%02x%s|r", color.r * 255, color.g * 255, color.b * 255, LOCALIZED_CLASS_NAMES_MALE[class].."  -  "..spec)
                                                                else
                                                                        frame.Spec:SetText(spec.."  -  "..LOCALIZED_CLASS_NAMES_MALE[class])
                                                                end

                                                                frame:Show()
                                                        end
                                                else
                                                        frame:Hide()
                                                end
                                        end
                                else
                                        for i = 1, 5 do
                                                arenaprep[i]:Hide()
                                        end
                                end
                        end
                end)


p3lim 07-11-16 01:03 PM

https://github.com/haste/oUF/pull/275

Please test!


All times are GMT -6. The time now is 03:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI