diff --git a/EventListener.lua b/EventListener.lua index 7d96b78..530f482 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -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 diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 9039ce8..36a32d2 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -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)