Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C_Item.GetDetailedItemLevelInfo reports incorrect item levels for some item strings #656

Open
Meorawr opened this issue Sep 12, 2024 · 1 comment
Labels
Bug Something isn't working Mainline This issue affects the current live Retail client

Comments

@Meorawr
Copy link
Collaborator

Meorawr commented Sep 12, 2024

The C_Item.GetDetailedItemLevelInfo when given certain item links can calculate incorrect values for the actualItemLevel return. The tooltip APIs appear to return correct data, but aren't portably usable on Classic and aren't quite as convenient to use.

Test case

Execute the following commands. The first command may require executing twice if the item data hasn't been loaded into the cache.

/dump (C_Item.GetDetailedItemLevelInfo("item:172187::::::::20:71::3:1:3524:::"))
/dump C_TooltipInfo.GetHyperlink("item:172187::::::::20:71::3:1:3524:::").lines[2].leftText

The output of the first command reports actualItemLevel as being 106, however the second command reports "Item Level 274". In this case, the tooltip value is purportedly correct.

@Meorawr Meorawr added Bug Something isn't working Mainline This issue affects the current live Retail client labels Sep 12, 2024
@ls-
Copy link

ls- commented Sep 12, 2024

The only accurate ilvl API right now is C_Item.GetCurrentItemLevel which uses ItemLocation. But when all you have to work with is an item link from an event, item locations aren't really viable. One could potentially try to match the link to an item in your bags, but it's not reliable because the order of bonuses and whatnot in these item links often is different. And that's assuming you're even trying to get the ilvl for an item in the player's inventory in the first place.

So the only other option in this case is parsing tooltip data which isn't really ideal, you have to jump through a bunch of hoops there, but at least it's accurate.

-- edit

And ilvl API discrepancies like that aren't limited to older items or Classic, it affects heirlooms, or even TWW items that got upgraded, for instance, quest rewards that sometimes go from greens to blues, and stuff like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Mainline This issue affects the current live Retail client
Projects
None yet
Development

No branches or pull requests

2 participants