diff --git a/Core/EventHandlers.lua b/Core/EventHandlers.lua index bdf947f7..d2f3f6fa 100644 --- a/Core/EventHandlers.lua +++ b/Core/EventHandlers.lua @@ -59,6 +59,7 @@ function EventHandlers:Register() self:RegisterBucketEvent("BAG_UPDATE", 0.5, "OnBagUpdate") self:RegisterEvent("LOOT_READY", "OnEvent") self:RegisterEvent("CURRENCY_DISPLAY_UPDATE", "OnCurrencyUpdate") + self:RegisterEvent("RESEARCH_ARTIFACT_COMPLETE", "OnResearchArtifactComplete") self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", "OnCombat") -- Used to detect boss kills that we didn't solo self:RegisterEvent("BANKFRAME_OPENED", "OnEvent") self:RegisterEvent("BANKFRAME_CLOSED", "OnEvent") @@ -233,9 +234,6 @@ end function R:OnCurrencyUpdate(event) self:Debug("Currency updated (" .. event .. ")") - -- Check if any archaeology projects were solved - self:ScanArchFragments(event) - -- Check if any coins were used for k, v in pairs(self.coins) do local currency = GetCurrencyInfo(k) @@ -1108,6 +1106,10 @@ function R:OnBagUpdate() R:ProcessInventoryItems() end +function R:OnResearchArtifactComplete(event, _) + self:ScanArchFragments(event) +end + --[[ OBTAIN DETECTION --------------------------------------------------------------------------------------------------------- -- Some easy, some fairly arcane methods to detect when we've obtained something we're looking for