View Single Post
02-10-16, 04:08 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by SDPhantom View Post
I could be wrong, but don't the PartyX UnitIDs point to raid members in your group?
Yeah, they do. But the main issue here is that if you don't filter the header, then it's gonna start from index 1, and it will always show the first party while in raid.

I managed to hack in to the initialConfigFunction like this:

Lua Code:
  1. self.header:SetAttribute("initialConfigFunction", [[
  2.         local header = self:GetParent()
  3.  
  4.         self:SetAttribute("unit", "party"..strmatch(self:GetName(), "UnitButton(%d)"))
  5.  
  6.         self:SetFrameStrata("Low")
  7.  
  8.         self:SetHeight(header:GetAttribute("style-height"))
  9.         self:SetWidth(header:GetAttribute("style-width"))
  10.         self:SetScale(header:GetAttribute("style-scale"))
  11.  
  12.         self:SetAttribute("maxColumns", 1)
  13.         self:SetAttribute("unitsPerColumn", 5)
  14.         self:SetAttribute("toggleForVehicle", true)
  15.  
  16.         self:SetAttribute("*type1", "target")
  17.         self:SetAttribute("type2", "togglemenu")
  18.  
  19.         self:SetAttribute("isHeaderDriven", true)
  20.  
  21.         header:CallMethod("initialConfigFunction", self:GetName())
  22.     ]])

I'm just not sure how valid is this solution, still testing.

The main goal would be to properly show the player's party when in raid too.

Last edited by Resike : 02-10-16 at 04:26 PM.
  Reply With Quote