comparison 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
comparison
equal deleted inserted replaced
11:10a2244f7ff0 12:417c3cfb9623
249 249
250 -- Retrieve items list 250 -- Retrieve items list
251 if not itemsCache[groupName] then 251 if not itemsCache[groupName] then
252 itemsCache[groupName] = {}; 252 itemsCache[groupName] = {};
253 253
254 local unknownItemName = "Unknown (#%d)";
255
254 -- Sort item list 256 -- Sort item list
255 for itemId in pairs(values.items) do 257 for itemId, _ in pairs(values.items) do
256 local itemName, itemLink, itemRarity = GetItemInfo(itemId); 258 local itemName, itemLink, itemRarity = GetItemInfo(itemId);
259
260 if not itemRarity then
261 print(itemId .. ": " .. itemName .. " - " .. itemLink);
262 end
257 263
258 table.insert(itemsCache[groupName], { 264 table.insert(itemsCache[groupName], {
259 id = itemId, 265 id = itemId,
260 name = itemName, 266 name = itemName or unknownItemName:format(itemId),
261 link = itemLink, 267 link = itemLink or unknownItemName:format(itemId),
262 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), 268 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),
263 rarity = itemRarity, 269 rarity = itemRarity or 1,
264 count = -3,--addon:GetItemCount(itemId), 270 count = -3,--addon:GetItemCount(itemId),
265 set = {}, 271 set = {},
266 }); 272 });
267 CACHE_ITEMS_TOTAL = CACHE_ITEMS_TOTAL + 1; 273 CACHE_ITEMS_TOTAL = CACHE_ITEMS_TOTAL + 1;
268 end 274 end