Fix pet issues if layout has Rested bar enabled
Adrian L Lange [08-17-09 - 14:20]
Fix pet issues if layout has Rested bar enabled
diff --git a/oUF_Experience.lua b/oUF_Experience.lua
index 63b6900..7f732c5 100644
--- a/oUF_Experience.lua
+++ b/oUF_Experience.lua
@@ -111,10 +111,17 @@ local function enable(self, unit)
if(bar.Rested) then
self:RegisterEvent('UPDATE_EXHAUSTION', argChecks)
end
- elseif(unit == 'pet') then
- if(select(2, UnitClass('player')) == 'HUNTER') then
- self:RegisterEvent('UNIT_PET_EXPERIENCE', argChecks)
- self:RegisterEvent('UNIT_PET', loadPet)
+ elseif(unit == 'pet' and select(2, UnitClass('player')) == 'HUNTER') then
+ self:RegisterEvent('UNIT_PET_EXPERIENCE', argChecks)
+ self:RegisterEvent('UNIT_PET', loadPet)
+
+ if(bar.Rested) then
+ bar.Rested:Hide()
+
+ if(bar.bg) then
+ bar.bg:SetParent(bar)
+ bar.bg:SetAllPoints(bar)
+ end
end
end