Thread Tools Display Modes
12-29-12, 09:00 AM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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?
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
12-30-12, 02:07 AM   #2
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
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.
  Reply With Quote
12-30-12, 04:18 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Dawn View Post
€: 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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-30-12, 07:41 AM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
@Monolit
Thanks I'll look into this. To bad one can't test this kind of stuff in skirmish arena anymore.


Originally Posted by Phanx View Post
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.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
12-30-12, 10:53 AM   #5
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by Dawn View Post
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.
  Reply With Quote
12-30-12, 05:54 PM   #6
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
@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?
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
12-31-12, 09:39 AM   #7
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
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.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
03-15-13, 07:59 AM   #8
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
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
  Reply With Quote
03-15-13, 08:14 AM   #9
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
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.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
06-02-13, 01:25 PM   #10
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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!
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."


Last edited by Dawn : 06-02-13 at 01:58 PM.
  Reply With Quote
06-06-13, 02:30 AM   #11
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I may have an idea.

*edit*
Ok bad idea. That is the arena panel.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-06-13 at 02:38 AM.
  Reply With Quote
06-06-13, 08:32 AM   #12
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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?
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
06-16-13, 04:29 AM   #13
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Arena prep ghost frames working

Originally Posted by Dawn View Post
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)
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
  Reply With Quote
06-16-13, 05:01 PM   #14
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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)
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
07-11-16, 01:03 PM   #15
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
https://github.com/haste/oUF/pull/275

Please test!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » arena frames in MoP

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