View Single Post
09-30-12, 08:55 PM   #16
Annekynn
A Fallenroot Satyr
Join Date: Jul 2009
Posts: 21
Originally Posted by Dridzt View Post
Code:
for i = 1 , GetNumGroupMembers() do
  local name, _, subgroup = GetRaidRosterInfo(i)
  if (name == Name(unit)) then
    return subgroup
  end
end
should be sufficient

Edit:
Ah, if there's any PARTY_MEMBERS_CHANGED, RAID_ROSTER_UPDATE events they should both be replaced with GROUP_ROSTER_UPDATE.
The group number always says 1, even when I moved people around. I have no option for GROUP_ROSTER_UPDATE , im assuming thats why its not updating. And my original code actually looked like this to display number and name (so I just updated it to say GetNumGroupMembers as you suggested):

Code:
for i = 1, GetNumGroupMembers() do
  if UnitIsUnit("raid"..i,unit) then
    local name, rank, subgroup = GetRaidRosterInfo(i)
    if name then return "%d %s", subgroup, name end
  end
end

Last edited by Annekynn : 09-30-12 at 09:01 PM.
  Reply With Quote