Only activate the Totem Bar on shamans

This commit is contained in:
Hendrik Leppkes
2009-07-08 14:29:21 +02:00
parent fde0996e08
commit c57c96727a
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -21,7 +21,11 @@ local MultiCastBar = setmetatable({}, {__index = Bar})
function MultiCastMod:OnInitialize()
self.db = Bartender4.db:RegisterNamespace("MultiCast", defaults)
if select(2, UnitClass("player")) ~= "SHAMAN" then
self:SetEnabledState(false)
else
self:SetEnabledState(self.db.profile.enabled)
end
end
function MultiCastMod:OnEnable()
@@ -43,6 +47,7 @@ function MultiCastMod:OnEnable()
end
function MultiCastMod:ApplyConfig()
if not self:IsEnabled() then return end
self.bar:ApplyConfig(self.db.profile)
end
+1
View File
@@ -39,6 +39,7 @@ function MultiCastMod:SetupOptions()
name = L["Totem Bar"],
desc = L["Configure the Totem Bar"],
childGroups = "tab",
disabled = function(info) return select(2, UnitClass("player")) ~= "SHAMAN" end,
}
Bartender4:RegisterBarOptions("MultiCast", self.options)
end