Mercurial > wow > inventory
diff Summary.lua @ 12:417c3cfb9623
GetItemInfo seems to be changed in 4.0.1, but I can?t find proper documentation on the changes done... Well anyway, whenever your items cache has been reset, Inventorium should continue default to itemname and link ?Unknown (#ITEMID)? and white rarity.
author | Zerotorescue |
---|---|
date | Sat, 16 Oct 2010 20:58:39 +0200 |
parents | 10a2244f7ff0 |
children | 5006cb0e97c6 |
line wrap: on
line diff
--- a/Summary.lua Tue Oct 12 02:11:23 2010 +0200 +++ b/Summary.lua Sat Oct 16 20:58:39 2010 +0200 @@ -251,16 +251,22 @@ if not itemsCache[groupName] then itemsCache[groupName] = {}; + local unknownItemName = "Unknown (#%d)"; + -- Sort item list - for itemId in pairs(values.items) do + for itemId, _ in pairs(values.items) do local itemName, itemLink, itemRarity = GetItemInfo(itemId); + if not itemRarity then + print(itemId .. ": " .. itemName .. " - " .. itemLink); + end + table.insert(itemsCache[groupName], { id = itemId, - name = itemName, - link = itemLink, + name = itemName or unknownItemName:format(itemId), + link = itemLink or unknownItemName:format(itemId), value = ((priceThreshold == 0) and 0) or -3,-- if no price threshold is set for this item, then don't look it up either --addon:GetAuctionValue(itemLink), - rarity = itemRarity, + rarity = itemRarity or 1, count = -3,--addon:GetItemCount(itemId), set = {}, });