Skip to content

Commit

Permalink
Merge pull request #560 from WowRarity/research-artifact-complete
Browse files Browse the repository at this point in the history
Move handling of artifact completions from CURRENCY_DISPLAY_UPDATE to RESEARCH_ARTIFACT_COMPLETE
  • Loading branch information
rdw-software authored Jul 13, 2023
2 parents 077bdee + 06274c2 commit dd6e6ec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Core/EventHandlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dd6e6ec

Please sign in to comment.