detect spelllock and devour magic

This commit is contained in:
Sumsebrum 2022-01-11 00:03:36 +01:00
parent 2dcdc9c978
commit f923f471d8
2 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,10 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
end
end
if srcUnit then
srcUnit = string_gsub(srcUnit, "pet", "")
if (not UnitExists(srcUnit)) then
return
end
if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED") then
local unitRace = Gladdy.buttons[srcUnit].race
-- cooldown tracker

View File

@ -65,6 +65,7 @@ function Pets:ResetUnit(unitId)
end
function Pets:PET_SPOTTED(unit)
Gladdy.guids[UnitGUID(unit)] = unit
if Gladdy.db.petEnabled then
self.frames[unit].healthBar:SetAlpha(1)
self.frames[unit].healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a)