View Single Post
06-28-10, 08:20 AM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I'm currently spawning maintank (and maintank target via xml template) and boss frames like this

Code:
	self:SetActiveStyle"Nivea - Boss"
	local boss = {}
		for i = 1, MAX_BOSS_FRAMES do
			local unit = self:Spawn("boss"..i, "oUF_NiveaBoss"..i)

			if i==1 then
				unit:SetPoint("CENTER", 400, 200)
			else
				unit:SetPoint("TOPLEFT", boss[i-1], "BOTTOMLEFT", 0, -10)
			end
			boss[i] = unit
		end
		
	self:SetActiveStyle"Nivea - MainTank"
	local Main_Tank = self:SpawnHeader("oUF_MainTank", nil, 'raid,party,solo', 
		'showRaid', true, 
		"groupFilter", "MAINTANK", 
		'yOffset', -20, 
		"template", "oUF_NiveaMTartemplate"
	)
	Main_Tank:SetPoint("TOP", UIParent, "TOP", 540, -280)

and I adress them via

Code:
local UnitSpecific = {
	boss = function(self)
		Shared(self)
		
		self.Power:SetWidth(Ncfgfs.width.M)			
		self:SetAttribute('initial-height', Ncfgfs.height.M)
		self:SetAttribute('initial-width', Ncfgfs.width.M)		
	end,
	
	MainTank = function(self)
		Shared(self)
		
		self.Power:SetWidth(Ncfgfs.width.M)			
		self:SetAttribute('initial-height', Ncfgfs.height.M)
		self:SetAttribute('initial-width', Ncfgfs.width.M)		
	end,	
		
}
I don't know if that's a good way, but it works. I'll have to look into arena frames, later.
__________________
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