# HG changeset patch # User yellowfive # Date 1414958201 28800 # Node ID eaf233ac41e61cc60eb3dcd6797aa4b241241768 # Parent d28e38e5240f7ce2cd8ea5069da0bfad81a42964 fixed bug with shopping list tab diff -r d28e38e5240f -r eaf233ac41e6 AskMrRobot.toc --- a/AskMrRobot.toc Sat Nov 01 22:52:14 2014 -0700 +++ b/AskMrRobot.toc Sun Nov 02 11:56:41 2014 -0800 @@ -1,7 +1,7 @@ ## Interface: 60000 ## Title: Ask Mr. Robot ## Author: Team Robot, Inc. -## Version: 15 +## Version: 16 ## Notes: Exports/Imports data to/from askmrrobot.com. ## URL: www.askmrrobot.com ## DefaultState: Enabled diff -r d28e38e5240f -r eaf233ac41e6 ui/ShoppingListTab.lua --- a/ui/ShoppingListTab.lua Sat Nov 01 22:52:14 2014 -0700 +++ b/ui/ShoppingListTab.lua Sun Nov 02 11:56:41 2014 -0800 @@ -689,10 +689,14 @@ self:SetEnchantIcon(row, enchant.optimized) local row2 = row self.enchantIcons[row2].itemName = nil - self:GetItemName(enchant.itemId, function(name) - self.enchantIcons[row2].itemName = name - self.enchantIcons[row2].itemText:SetText(name) - end) + if not enchant.itemId then + self.enchantIcons[row2].itemText:SetText("unknown") + else + self:GetItemName(enchant.itemId, function(name) + self.enchantIcons[row2].itemName = name + self.enchantIcons[row2].itemText:SetText(name) + end) + end self:SetEnchantQuantity(row, enchant.count, enchant.total) lastControl = self.enchantIcons[row] row = row + 1 @@ -767,15 +771,13 @@ end function AskMrRobot.ShoppingListTab:On_GET_ITEM_INFO_RECEIVED() - for i = 1, #self.itemNames do + for i = #self.itemNames, 1, -1 do local name = GetItemInfo(self.itemNames[i].itemId) if name then self.itemNames[i].func(name) tremove(self.itemNames, i) - i = i - 1 end end - self.itemNames = itemNames end function AskMrRobot.ShoppingListTab:OnEvent(frame, event, ...)