diff --git a/EventListener.lua b/EventListener.lua index aef0ae1..257bf5d 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -103,19 +103,19 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if destUnit then -- diminish tracker - if (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then + if Gladdy.buttons[destUnit] and (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then Diminishings:AuraFade(destUnit, spellID) end -- death detection - if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then + if (Gladdy.buttons[destUnit] and eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then Gladdy:SendMessage("UNIT_DEATH", destUnit) end -- spec detection - if not Gladdy.buttons[destUnit].class or not Gladdy.buttons[destUnit].race then + if Gladdy.buttons[destUnit] and (not Gladdy.buttons[destUnit].class or not Gladdy.buttons[destUnit].race) then Gladdy:SpotEnemy(destUnit, true) end --interrupt detection - if eventType == "SPELL_INTERRUPT" then + if Gladdy.buttons[destUnit] and eventType == "SPELL_INTERRUPT" then Gladdy:SendMessage("SPELL_INTERRUPT", destUnit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool) end end