Update tooltip scanning logic to use the C_TooltipInfo APIs
rdw-software opened this issue · 6 comments
The old code should still work, so updating it is less urgent (and will require clearing out some technical debt).
Note: Tooltip scanning is referring to the "hacky" way of using __Rarity_ScanTip
and GameTooltip
in the code.
Leftover from #501 .
Maybe... probably? I was unable to reproduce that particular issue, which makes me think it's caused by another addon interfering with the tooltip handler that Rarity sets. Can you try disabling all other addons?
I have the same
Problem but it seems only to happen on lifing(alife) mobs.
For me it seams to be my the enemy healthbar addon "NeatPlate" which causes this reaction.
I think this is what's happening:
- Any addon creates a tooltip scanning frame - basically, anything that inherits the
GameTooltipTemplate
- Rarity registers its tooltip handler (just once)
- Whenever any tooltip frame updates, ALL hooks are called (instead of just
GameTooltip
, as previously/intended) - This means Rarity's tooltip handler is called whenever any other addon does "something" with their own tooltips
If my suspicions are correct, then it's due to Blizzard's awkward design, where a "global" registry is used but there aren't really any events to subscribe to, except TOOLTIP_DATA_UPDATE, which is useless in this context.
Before the patch, whenever GameTooltip
(the standard tooltip frame) was shown, Rarity would add its status line as appropriate. Now it is adding the status line to the standard tooltip once for each tooltip that is triggering the hook via Blizzard's internal ProcessTooltipPostCalls
function. This means we have to check which tooltip causes the activity and exit early if it wasn't the standard tooltip.
I'll test this theory shortly and try out the fix. But I'll add that all of this has actually nothing to do with the original issue, which is referencing the tooltip scanning that Rarity performs to get instance lockouts (IIRC). In theory, it should actually cause the duplicate lines to be added while using that tooltip, as well. Not sure why this isn't the case, though.
Unfortunately I still can't replicate the problem, so I'll just push a (presumed) fix and see if it helps.