From ead0ec7316a25f407eeca51874127b23780d214f Mon Sep 17 00:00:00 2001 From: Elesario <60847546+Elesario@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:32:26 +0100 Subject: [PATCH] Fix OutfitterBar.lua for errors in change icon filter options Both the change icon options to filter for your own spellbook and your bags cause errors currently in WotLK classic. Determined cause and added fixes. Also have logged issue as "WotLK Outfitter Icon selection bugs. #143" --- OutfitterBar.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OutfitterBar.lua b/OutfitterBar.lua index e94ca6c..119543a 100644 --- a/OutfitterBar.lua +++ b/OutfitterBar.lua @@ -1223,7 +1223,7 @@ function Outfitter.OutfitBar.TextureSets.Spellbook:Activate() for _, professionID in ipairs(professions) do local name, iconID = GetProfessionInfo(professionID) - if not usedIconIDs[iconID] then + if iconID and not usedIconIDs[iconID] then table.insert(self.TextureList, iconID) usedIconIDs[iconID] = true end @@ -1310,9 +1310,9 @@ function Outfitter.OutfitBar.TextureSets.Inventory:Activate() local vNumBagSlots = C_Container.GetContainerNumSlots(vBagIndex) if vNumBagSlots > 0 then - for vSlotIndex = 1, vNumBagSlots do - local itemInfo = C_Containeer.GetContainerItemInfo(vBagIndex, vBagSlotIndex) - local vTexture = itemInfo.iconFileID + for vBagSlotIndex = 1, vNumBagSlots do + local itemInfo = C_Container.GetContainerItemInfo(vBagIndex, vBagSlotIndex) + local vTexture = itemInfo and itemInfo.iconFileID if vTexture and not vUsedTextures[vTexture] then table.insert(self.TextureList, vTexture)