Classic: GROUP_ROSTER_UPDATE is fired before GetRaidRosterInfo(i) can get data
Shamzaa opened this issue ยท 1 comments
Describe the bug
Added a trigger listening for the GROUP_ROSTER_UPDATE https://wow.gamepedia.com/GROUP_ROSTER_UPDATE
In my WA I fetch information about all the members in the current raid, whenever that event is fired.
function(...)
local raidsize = GetNumGroupMembers()
-- raidOverview[class][name] = 1 - name, 2 - rank, 3 - subgroup, 4 - level, 5 - class
local raidOverview = {}
for i=1,raidsize do
local name, rank, subgroup, level, class = GetRaidRosterInfo(i)
It works fine whenever it is triggerd while I'm logged in.
However, when I personally log in, it is fired once per raid member present, and GetRaidRosterInfo(i) is returning nil, presumably because that information isn't ready yet. It does return information about the player, though.
the suggested workaround that worked for me was to set the trigger to keep retry broadcasting the same event until it can find RaidRosterInfo about the last member.
function(event)
if not GetRaidRosterInfo(GetNumGroupMembers()) then
if aura_env.timer then aura_env.timer:Cancel() end
aura_env.timer = C_Timer.NewTimer(0.2, function() WeakAuras.ScanEvents("GROUP_ROSTER_UPDATE") end)
else
if event == "GROUP_ROSTER_UPDATE" then
return true
end
end
end
Which version of WeakAuras are you using?
1.13.3
Are you on World of Warcraft Classic or Retail?
- [x ] Classic