diff --git a/modules/guildroster.lua b/modules/guildroster.lua index 6156a1a..d08cebc 100644 --- a/modules/guildroster.lua +++ b/modules/guildroster.lua @@ -25,15 +25,12 @@ local BLACKLIST = { function mod:OnInitialize() self:RegisterOptions(options, defaults, function(d) db=d end) + -- must be in OnInitialize because ADDON_LOADED is buggy otherwise + self:RegisterEvent("ADDON_LOADED") end function mod:OnEnable() self:RegisterEvent("RAID_ROSTER_UPDATE") - if IsAddOnLoaded("Blizzard_GuildUI") then - self:ADDON_LOADED(_, "Blizzard_GuildUI") - else - self:RegisterEvent("ADDON_LOADED") - end end function mod:ADDON_LOADED(_, name) diff --git a/modules/miscellaneous.lua b/modules/miscellaneous.lua index 2110d80..c3546bf 100644 --- a/modules/miscellaneous.lua +++ b/modules/miscellaneous.lua @@ -52,6 +52,15 @@ function mod:OnInitialize() -- allow max camera zoom ConsoleExec("cameradistancemaxfactor 5") CompactRaidFrameContainer.Show = CompactRaidFrameContainer.Hide + + -- Fix guild crafters: must be in OnInitialize because ADDON_LOADED is buggy otherwise + self:RegisterEvent("ADDON_LOADED", function(_, name) + if name == "Blizzard_TradeSkillUI" then + for i=1, TRADE_SKILL_GUILD_CRAFTERS_DISPLAYED do + _G["TradeSkillGuildCrafter"..i.."Text"].SetTextColor = function() end + end + end + end) end @@ -80,15 +89,6 @@ function mod:OnEnable() -- louder LFD sound self:RegisterEvent("LFG_PROPOSAL_SHOW"); - - -- Fix guild crafters - self:RegisterEvent("ADDON_LOADED", function(_, name) - if name == "Blizzard_TradeSkillUI" then - for i=1, TRADE_SKILL_GUILD_CRAFTERS_DISPLAYED do - _G["TradeSkillGuildCrafter"..i.."Text"].SetTextColor = function() end - end - end - end) end -- Slash Commands --------------------------------------------------------------