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