Skip to content

Commit

Permalink
Fix OutfitterBar.lua for errors in change icon filter options
Browse files Browse the repository at this point in the history
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. cdmichaelb#143"
  • Loading branch information
Elesario authored Jun 12, 2023
1 parent cfdf782 commit ead0ec7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OutfitterBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ead0ec7

Please sign in to comment.