Skip to content

Commit

Permalink
added itemrack as dependency again - this time it works
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSchaffner committed Feb 21, 2024
1 parent aed92e1 commit 6b3a7c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BetterBags_ItemRack.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
## Notes: Add a category to BetterBags for ItemRack sets
## Author: DJSchaffner
## Version: @1.3.0
## Dependencies: BetterBags
## Dependencies: BetterBags, ItemRack

main.lua
12 changes: 6 additions & 6 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ local L = addonBetterBags:GetModule('Localization')

local debug = false
local frame = CreateFrame("Frame", nil)

-------------------------------------------------------

local function printChat(message)
if debug == true then
print("[BetterBags ItemRack] ".. tostring(message))
Expand Down Expand Up @@ -92,13 +94,11 @@ local function itemRackUpdated(event, eventData)
printChat(event)
updateCategories()
end

-------------------------------------------------------
frame:RegisterEvent("ADDON_LOADED")
frame:SetScript("OnEvent", function(self, event, addon, ...)
if event == "ADDON_LOADED" and addon == "ItemRack" then

-- Don't listen for load event since it should be loaded already (dependency)
ItemRack:RegisterExternalEventListener("ITEMRACK_SET_SAVED", itemRackUpdated)
ItemRack:RegisterExternalEventListener("ITEMRACK_SET_DELETED", itemRackUpdated)

initCategories()
end
end)
initCategories()

0 comments on commit 6b3a7c1

Please sign in to comment.