Item Compare doesn't evaluate items correctly if it were to unequip, say your shield
tilkinsc opened this issue ยท 3 comments
So I started work on this. It is interesting. It appears that I have no way to do it prettier than to make local-to-file variables outside an event function to keep track of the current tooltips, as they appear 1 by 1 and execute OnTooltipSetItem event twicefor GameTooltip. Also, OnTooltipCleared also pops twice.
So, the OnTooltipSetItem handler can set the data it needs as the tooltip pops up and draw any data it has to the tooltip. The OnTooltipCleared can reset the data to nil when nothing is being compared. However, a latch needs to be used with the OnTooltipCleared method. This is a bit brutal and a bit more hectic than I like.
Once I figure out how I want it organized and such, I will release a beta.
A way to get around this is if I get the current items equipped and reinvent what will happen, then wait for all tooltips to be present before actually operating. The latch may be able to be removed if I check if the tooltips in question are actually shown to the player.