diff --git a/EventListener.lua b/EventListener.lua index 257bf5d..8f985a5 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -98,8 +98,11 @@ end function EventListener:COMBAT_LOG_EVENT_UNFILTERED() -- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() - local srcUnit = Gladdy.guids[sourceGUID] - local destUnit = Gladdy.guids[destGUID] + local srcUnit = Gladdy.guids[sourceGUID] -- can be a PET + local destUnit = Gladdy.guids[destGUID] -- can be a PET + if (Gladdy.db.shadowsightTimerEnabled and eventType == "SPELL_AURA_APPLIED" and spellID == 34709) then + Gladdy.modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) + end if destUnit then -- diminish tracker diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index d16c21d..d25dfc3 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -33,7 +33,6 @@ end function ShadowsightTimer:Initialize() self.locale = Gladdy:GetArenaTimer() self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("AURA_GAIN") self:CreateAnchor() end @@ -146,7 +145,7 @@ function ShadowsightTimer:JOINED_ARENA() end function ShadowsightTimer:AURA_GAIN(unit, auraType, spellID) - if (spellID == 34709) then + if (spellID == 34709 and Gladdy.db.shadowsightTimerEnabled) then self:Start(Gladdy.db.shadowsightTimerResetTime, self:GetHiddenTimer()) end end