Quantcast GetRaidRosterInfo bug - WoWInterface
 
Thread Tools Display Modes
09-10-14, 07:18 PM   #1
galvin
A Frostmaul Preserver
Join Date: Nov 2006
Posts: 263
GetRaidRosterInfo bug

Will return nil if a new person joins the raid. But only one time.
I tested this on the leveling realm, had someone join from the pve 100 realm.
once the game sees the player, even if that player logs out back in, the function won't return nil
anymore. ignore the print functions, that's just debug testing code.
I use this function when GROUP_ROSTER_UPDATE fires.

Code:
function GWL:GROUP_ROSTER_UPDATE()
  local Found = false
  local MaxMembers = GetNumGroupMembers()

  -- Preset the waitlist to Outside
  if WaitList then
    for Index, _ in pairs(WaitList) do
      WaitList[Index] = Outside
    end
  end

  -- Return if not in a group/raid.
  if MaxMembers > 0 then

    -- If first time joining a raid then start a new waitlist.
    if not RaidActive then
      ClearWaitList()
      RaidActive = true
    end

    for Index = 1, MaxMembers do

      -- Set player as in raid.
      local Player = GetRaidRosterInfo(Index)
      print('>', Player, Player == nil)
      if Player and Player ~= '' then
        Player = Ambiguate(GetRaidRosterInfo(Index), 'none')
        if Player then
          print(':', Player)
          WaitList[Player] = InRaid
        end
      end
    end
  else
    RaidActive = false
  end

  -- Save RaidActive status
  GalvinWaitListDB.RaidActive = RaidActive

  return Found
end
 
09-10-14, 09:59 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Not related to the bug, but:

Code:
      local Player = GetRaidRosterInfo(Index)
      print('>', Player, Player == nil)
      if Player and Player ~= '' then
        Player = Ambiguate(GetRaidRosterInfo(Index), 'none')
Why call GetRaidRosterInfo(Index) a second time on the last line, when you already called it and stored its value in the Player variable on the first line? Just do Player = Ambiguate(Player, 'none') there.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
 
09-11-14, 12:40 AM   #3
galvin
A Frostmaul Preserver
Join Date: Nov 2006
Posts: 263
Oops, bug still remains though.
 
09-11-14, 02:19 AM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
It sounds like the game isn't caching the player's info until you actually request it.

You may want to delay your GetRaidRosterInfo call to see if it always fails the first time you call it or only when you call it immediately after they join.
 
 

WoWInterface » Site Forums » Archived Beta Forums » WoD Beta archived threads » GetRaidRosterInfo bug

Thread Tools
Display Modes

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