To hide on max level characters:
OnLoad:
Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
OnEvent:
Code:
if UnitLevel("player") == 90 then
self:Hide()
end
To hide based on spec:
OnLoad:
Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
OnEvent:
Code:
if GetSpecialization() == 2 then
self:Show()
else
self:Hide()
end
This shows the panel if you're in specialization 2 (specializations are numbered from top to bottom, for example- specialization 2 for Rogues is Combat, Protection for Paladins, etc. You can change that number to change for which spec the panel shows or you swap the Show() and Hide() to make it hide when you're in that spec.