From 9150d2f67d043a55bd9e12f248902bc179498982 Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Mon, 4 Dec 2023 15:42:46 -0800 Subject: [PATCH] Fixed a bug where equipment sets aren't showing up at times. --- data/equipmentsets.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/equipmentsets.lua b/data/equipmentsets.lua index 4c6f592f..5787e67e 100644 --- a/data/equipmentsets.lua +++ b/data/equipmentsets.lua @@ -10,6 +10,9 @@ local equipmentSets = addon:NewModule('EquipmentSets') ---@class Events: AceModule local events = addon:GetModule('Events') +---@class Debug: AceModule +local debug = addon:GetModule('Debug') + function equipmentSets:OnInitialize() self.bagAndSlotToSet = {} end @@ -24,7 +27,7 @@ function equipmentSets:Update() for _, setID in ipairs(sets) do local setName = C_EquipmentSet.GetEquipmentSetInfo(setID) local setLocations = C_EquipmentSet.GetItemLocations(setID) - for _, location in ipairs(setLocations) do + for _, location in pairs(setLocations) do local _, bank, bags, _, slot, bag = EquipmentManager_UnpackLocation(location) if (bank or bags) and slot ~= nil and bag ~= nil then self.bagAndSlotToSet[bag] = self.bagAndSlotToSet[bag] or {}