LibItemUpgradeInfo-1.0
LibItemUpgradeInfo-1.0 provides information about item upgrades applied to items.
Functions
:GetUpgradeID(itemString)
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
- upgradeID
- Number - The upgrade ID (possibly 0), or
nil
if the input is invalid or does not contain upgrade info
:GetCurrentUpgrade(id)
Returns the current upgrade level of the item, e.g. 1 for a 1/2 item.
Arguments
- id
- Number - The upgrade ID of the item (obtained via
GetUpgradeID()
)
Returns
- upgradeLevel
- Number - The current upgrade level of the item, or
nil
if the item cannot be upgraded
:GetMaximumUpgrade(id)
Returns the maximum upgrade level of the item, e.g. 2 for a 1/2 item.
Arguments
- id
- Number - The upgrade ID of the item (obtained via
GetUpgradeID()
)
Returns
- upgradeLevel
- Number - The maximum upgrade level of the item, or
nil
if the item cannot be upgraded
:GetItemLevelUpgrade(id)
Returns the item level increase that this upgrade is worth, e.g. 4 for a 1/2 item or 8 for a 2/2 item.
Arguments
- id
- Number - The upgrade ID of the item (obtained via
GetUpgradeID()
)
Returns
- ilvlDelta
- Number - The item level increase of the item, or 0 if the item cannot be or has not been upgraded
:GetItemUpgradeInfo(itemString)
Returns the current upgrade level, maximum upgrade level, and item level increase for an item.
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
nil
if the item is invalid or cannot be upgraded, otherwise:
- curUpgradeLevel
- Number - The current upgrade level of the item
- maxUpgradeLevel
- Number - The maximum upgrade level of the item
- lvlDelta
- Number - The item level increase of the item
:GetHeirloomTrueLevel(itemString)
Returns the true item level for an heirloom.
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
- ilvl
- Number - The true item level of the item, or
nil
if the input is invalid - isTrue
- Boolean -
true
if the returned item level is the "true" item level of an heirloom, orfalse
if the item was not an heirloom or some error occurred while scanning the tooltip.
:GetUpgradedItemLevel(itemString)
Returns the true item level of the item, including upgrades and heirlooms.
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
- ilvl
- Number - The true item level of the item, or
nil
if the input is invalid
:IsBop(itemString)
Checks if an item is Bind On Pikcup.
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
- flag
- Boolean - True if item is Bind on Pickup
:IsBoe(itemString)
Checks if an item is Bind On Equip.
Arguments
- itemString
- String - An
itemLink
oritemString
denoting the item
Returns
- flag
- Boolean - True if item is Bind on Equip
Example
local ItemUpgradeInfo = LibStub("LibItemUpgradeInfo-1.0") local item = GetInventoryItemLink("player", 1) local upgrade, max, delta = ItemUpgradeInfo:GetItemUpgradeInfo(item) if upgrade then local ilvl = ItemUpgradeInfo:GetUpgradedItemLevel(item) DEFAULT_CHAT_FRAME:AddMessage(("%s %d/%d (+%d -> %d)"):format(item, upgrade, max, delta, ilvl)) else DEFAULT_CHAT_FRAME:AddMessage(item .. " cannot be upgraded") end
Same code using the GetItemUpgradeInfo()
convenience function:
local ItemUpgradeInfo = LibStub("LibItemUpgradeInfo-1.0") local item = GetInventoryItemLink("player", 1) local upgrade, max, delta = ItemUpgradeInfo:GetItemUpgradeInfo(item) if upgrade then local ilvl = ItemUpgradeInfo:GetUpgradedItemLevel(item) DEFAULT_CHAT_FRAME:AddMessage(("%s %d/%d (+%d -> %d)"):format(item, upgrade, max, delta, ilvl)) else DEFAULT_CHAT_FRAME:AddMessage(item .. " cannot be upgraded") end
Are u going to do a new version for artifact weapon ilvl with the Netherlight Crucible the add-on didn't take the ilvl bonus ^^
Yo, Alar. You updated this library to version 70300-28 (as shown on the WowAce page), but didn't update this page to show the new information (new version number and that it supports 7.3). The Download button still downloads the old version. Thanks for the update though. :)
This page should be updated by Curse... I have no way to change it.
On curseforge the new release is packaged and fine.... not sure what I can do
It's all good. I'm not an add-on author/maintainer so I have no idea what you change and what Curse changes. Thanks for your work. :)
I have the .pkgmeta entry (in an SVN project):
Libs/LibItemUpgradeInfo-1.0:
url: git://git.wowace.com/wow/libitemupgradeinfo-1-0.git
What should it be for the current version of Curseforge / Wowace? I assume some form of:
https://repos.wowace.com/wow/libitemupgradeinfo-1-0
From my own addo ItemlevelDisplay.
libs/LibItemUpgradeInfo-1.0:
url: git://git.wowace.com/wow/libitemupgradeinfo-1-0/mainline.git
Looks like pkgmeta si still workiong with git protocol
Alar,
I posted the below on the Auctionator comments section. It is related to when the default tooltip (npc, pc info tooltip) has been moved from the default location that is in the lower right corner (horrible location for it):
The Gigantic Tooltip bug is actually from the Library - LibItemUpgradeInfo-1.0. A combination of that and moving the tooltip to anywhere other than the default causes the bug.
I had the same issue when upgrading to the newest Auctionator and reverted back. I use a mod called SyLevel that displays the items ilvl on the char sheet and the bags. After patch 7.1 a few items were displaying the wrong ilvl. I figured the issue was with the older version of the library that SyLevel was using.
Auctionator 4.0.14 uses LibItemUpgradeInfo-1.0 version 26 and SyLevel uses 24. When version 27 is used, the tooltips break. The below link is a direct link to the version 27 description. The author did something with anchoring tooltips, which stretches the tooltop from your item all the way to where you moved the tooltip. What sucks is, version 27 fixes the ilvl being wrong, but introduces this nasty bug. I have to live with wrong ilvl's because the default tooltip location is horrible.
https://www.wowace.com/addons/libitemupgradeinfo-1-0/files/52-release-70100-27/
I totally missed this comment.
This library uses a private tooltip, not the shared one.. so there should no way to mess Blizzard one
TipTop just added this change - must have been on their end and your change just exposed it :)
2.16.2
- update TOC for 7.1
- tweaked specialization line code
- tweaked tooltip anchor code (should play nice with the updates to LibItemUpgradeInfo using by Auctionator, etc)
Wow... hard to find and test.
Have you also checked what is doing TipTop with GameTooltip_SetDefaultAnchor ?
I think my use of it was legit... will install TipTop and check, anyway
Versions Release-70100-27 and -28 have a bug (mostly-blank tool tip) when using this library (embedded in Auctionator) and the TipTop addons. I tracked the problem down to line 180 (Core.lua). Removing this line (GameTooltip_SetDefaultAnchor(scanningTooltip,anchor)) resulted in both addons appearing to function normally.
@toanqc
Same issue here using r26 and r27. Nearly all my gear is displaying either ilvl 680 or 660 in both my bags and character panel. Rolling back to r25 fixes the issue.
Item 780 is displaying at 680 in bag. See screenshot
Screenshot
@backclipped
AH, thank you, was starting to check it right now, I'll verify your suggestion asap
Hi,
Timewarped Warforged items are not supported.
edit:
actually found the fix for it:
@alar
Thank you! I use this for Simple iLevel and since I no longer play I moved the internal methods to this lib. Good to see its staying updated.
@ckaotik
Hi all, I volunteered to maintain Libitemupgradeinfo. Thank you for the informations, I hope I'll release an update in the next weekend Stay tuned
Sad to hear you're no longer playing, eridius :( Still gonna post my discoveries here.
The only new entry for the item levels table seems to be this for timewarped items:
6.2 changed the item link format, and added another value (specialization id) before the upgradeID.
Adding an extra %d+ to GetUpgradeID is therefore necessary:
I'm no longer playing World of Warcraft. If anyone wants to volunteer to maintain this addon (updating it for new versions is very easy, there's a debug function you call to spit out the table changes), please let me know.
@olzenkhaw
I really don't want to maintain a database of Garrosh heirlooms. Beyond that, what you're suggesting will only work for Garrosh heirlooms and won't work for any others. The tooltip approach that I implemented should work for all heirlooms.