Only activate the Totem Bar on shamans
This commit is contained in:
@@ -21,8 +21,12 @@ local MultiCastBar = setmetatable({}, {__index = Bar})
|
|||||||
|
|
||||||
function MultiCastMod:OnInitialize()
|
function MultiCastMod:OnInitialize()
|
||||||
self.db = Bartender4.db:RegisterNamespace("MultiCast", defaults)
|
self.db = Bartender4.db:RegisterNamespace("MultiCast", defaults)
|
||||||
|
if select(2, UnitClass("player")) ~= "SHAMAN" then
|
||||||
|
self:SetEnabledState(false)
|
||||||
|
else
|
||||||
self:SetEnabledState(self.db.profile.enabled)
|
self:SetEnabledState(self.db.profile.enabled)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function MultiCastMod:OnEnable()
|
function MultiCastMod:OnEnable()
|
||||||
if not self.bar then
|
if not self.bar then
|
||||||
@@ -43,6 +47,7 @@ function MultiCastMod:OnEnable()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MultiCastMod:ApplyConfig()
|
function MultiCastMod:ApplyConfig()
|
||||||
|
if not self:IsEnabled() then return end
|
||||||
self.bar:ApplyConfig(self.db.profile)
|
self.bar:ApplyConfig(self.db.profile)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ function MultiCastMod:SetupOptions()
|
|||||||
name = L["Totem Bar"],
|
name = L["Totem Bar"],
|
||||||
desc = L["Configure the Totem Bar"],
|
desc = L["Configure the Totem Bar"],
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
|
disabled = function(info) return select(2, UnitClass("player")) ~= "SHAMAN" end,
|
||||||
}
|
}
|
||||||
Bartender4:RegisterBarOptions("MultiCast", self.options)
|
Bartender4:RegisterBarOptions("MultiCast", self.options)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user