Thread Tools Display Modes
05-20-10, 07:26 AM   #1
Silberbüchse
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 6
oUF MainTanks (Ora2 & Blizzard)

Hi,
iam looking for a ouf code snippet that show oRA2 & Blizzards MTs & MTTs.
Actually iam a ouf_shestak user. Here's the code from his layout:

Code:
if not unitframe_hide_raid then
	--[[local tank = oUF:Spawn("header", "oUF_MainTank")
	tank:SetManyAttributes("showRaid", true, "groupFilter", "MAINTANK", "yOffset", -5)
	tank:SetPoint("BOTTOMRIGHT", "oUF_Target", "LEFT", unitframe_tank_position_x, unitframe_tank_position_y)
	tank:SetAttribute("template", "oUF_MainTank")
	tank:Show()]]
	local tank = oUF:Spawn('header', 'oUF_MainTank')
		tank:SetPoint("BOTTOMRIGHT", "oUF_Target", "LEFT", unitframe_tank_position_x, unitframe_tank_position_y)
		tank:SetManyAttributes("showRaid", true, "groupFilter", "MAINTANK", "yOffset", -5)
	if oRA3 and not select(2,IsInInstance()) == "pvp" and not select(2,IsInInstance()) == "arena" then
		tank:SetAttribute(
			"initial-unitWatch", true,
			"nameList", table.concat(oRA3:GetSortedTanks(), ",")
		)
		local tankhandler = CreateFrame('Frame')
		function tankhandler:OnEvent()
			if(InCombatLockdown()) then
				self:RegisterEvent('PLAYER_REGEN_ENABLED')
			else
				self:UnregisterEvent('PLAYER_REGEN_ENABLED')
					if self.tanks then
						tank:SetAttribute(
							"nameList", table.concat(self.tanks, ","))
						self.tanks = nil
					end
			end
		end
		function tankhandler:OnTanksUpdated(event, tanks)
			self.tanks = tanks
			self:OnEvent()
		end
		tankhandler:SetScript('OnEvent', tankhandler.OnEvent)
		oRA3.RegisterCallback(tankhandler, "OnTanksUpdated")
	else
		tank:SetAttribute("template", "oUF_MainTank")
	end
	tank:Show()
end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF MainTanks (Ora2 & Blizzard)


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