C_LFGList.GetApplicantMemberInfo doesn't return actual spec id's for premade groups of 2 or more players
NintendoLink07 opened this issue · 3 comments
17x FrameXML/LFGList.lua:1877: bad argument #1 to 'format' (string expected, got nil)
[string "=[C]"]: in function `format'
[string "@FrameXML/LFGList.lua"]:1877: in function <FrameXML/LFGList.lua:1851>
[string "=[C]"]: ?
Locals:
(*temporary) = "%s %s"
(*temporary) = nil
(*temporary) = "Paladin"
(*temporary) = "string expected, got nil"
With the 10.2 patch C_LFGList.GetApplicantMemberInfo
now also returns the spec ID of the applicant, which is then shown in the tooltip as a formatted string.
When a premade group of 2 or more players applies to your group listing and you hover over them it produces this error.
The function does only return a real spec ID when a single player applies to the group, with 2 or more players it returns spec ID values like:
- 0 and 19990 (2 applicants)
- 135641088 and 135614548 (2 applicants)
- 16779543 and 3 (2 applicants)
- 0 and 3 and 1 (3 applicants)
- 0 and 135679510 and 1 (3 applicants)
- 0 and 20332 (4 applicants)
Created WeakAura with temporary fix if anyone wants: Fix Error LFGList.lua:1877. It makes GetSpecNameBySpecID
to return empty string instead of nil
when no real specID is passed.
This doesn't only happen with group applications. It sometimes also happens with individual applicants. This is seemingly random, but can tell that it always happens with groups from my experience.
The 0
and 1
returned here are also a boolean according to an error while comparing them with a number.
However, calling type(specID) == "number"
or type(specID) == "boolean"
both return false for some reason that is probably beyond my current knowledge of the Lua implementation. Only the third condition is evaluated as true in this code.
Integer overflow can also happen when calling this method.
Issue seems to have been fixed with the update this morning.
All applications from premades groups have correct spec id's attached to them now.