From eaec5d1f9d24806f9a6e4adb2d0373b0215ec4df Mon Sep 17 00:00:00 2001 From: d87 Date: Thu, 14 Nov 2013 02:10:52 +0700 Subject: [PATCH] don't eat application events of registered spells --- NugRunning.lua | 15 ++++++++------- helpers.lua | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/NugRunning.lua b/NugRunning.lua index 8c12f6c..851e7de 100644 --- a/NugRunning.lua +++ b/NugRunning.lua @@ -276,18 +276,18 @@ function NugRunning.COMBAT_LOG_EVENT_UNFILTERED( self, event, timestamp, eventTy if opts.target and dstGUID ~= UnitGUID(opts.target) then return end if affiliationStatus then if eventType == "SPELL_AURA_REFRESH" then - return self:RefreshTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType, nil, amount) + self:RefreshTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType, nil, amount) elseif eventType == "SPELL_AURA_APPLIED_DOSE" then - return self:RefreshTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType, nil, amount, opts._ignore_applied_dose) + self:RefreshTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType, nil, amount, opts._ignore_applied_dose) elseif eventType == "SPELL_AURA_APPLIED" then - return self:ActivateTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType) + self:ActivateTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, auraType) elseif eventType == "SPELL_AURA_REMOVED" then - return self:DeactivateTimer(srcGUID, dstGUID, spellID, spellName, opts, auraType) + self:DeactivateTimer(srcGUID, dstGUID, spellID, spellName, opts, auraType) elseif eventType == "SPELL_AURA_REMOVED_DOSE" then - return self:RemoveDose(srcGUID, dstGUID, spellID, spellName, auraType, amount) + self:RemoveDose(srcGUID, dstGUID, spellID, spellName, auraType, amount) elseif eventType == "SPELL_MISSED" then if NRunDB.missesEnabled then - return self:ActivateTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, "MISSED", auraType) -- auraType = missType in this case + self:ActivateTimer(srcGUID, dstGUID, dstName, dstFlags, spellID, spellName, opts, "MISSED", auraType) -- auraType = missType in this case end elseif eventType == "SPELL_CAST_SUCCESS" then lastCastSpellID = spellID @@ -305,7 +305,8 @@ function NugRunning.COMBAT_LOG_EVENT_UNFILTERED( self, event, timestamp, eventTy if opts.action then opts.action(active, srcGUID, dstGUID, spellID) else - return self:ActivateTimer(playerGUID, playerGUID, dstName, nil, spellID, spellName, opts, "EVENT", opts.duration) + self:ActivateTimer(playerGUID, playerGUID, dstName, nil, spellID, spellName, opts, "EVENT", opts.duration) + break end end end diff --git a/helpers.lua b/helpers.lua index c63b5df..310eed9 100644 --- a/helpers.lua +++ b/helpers.lua @@ -55,6 +55,7 @@ helpers.Anchor = function(name, opts) end helpers.Spell = function(id, opts) + if not opts then NugRunningConfig[id] = opts end if opts.singleTarget then opts.target = "target" end if opts.anySource then opts.affiliation = AFFILIATION_PARTY_OR_RAID end if opts.affiliation == "raid" then opts.affiliation = AFFILIATION_PARTY_OR_RAID end