Files
coa-bartender/Bartender4/Options/MultiCastBar.lua
T
florian.berthold f8cfedfc06 fix(MultiCast): let CoA custom classes (Witchdoctor) get the totem bar
Both MultiCastBar.lua and Options/MultiCastBar.lua hard-coded a class-mask
gate of SHAMAN|HERO, which doesn't know about CoA custom classes. As a
result, Witchdoctor (and any other CoA class the engine produces a totem
bar for) never had Bartender's wrapper module register, leaving the totem
bar un-skinned / un-configurable.

Keep the original mask check as the fast path, but fall through and load
the module when MultiCastActionBarFrame already exists — the engine only
creates that frame for classes that actually use the totem bar, so it's a
reliable class-agnostic test.
2026-05-23 16:01:06 +02:00

59 lines
1.6 KiB
Lua

--[[
Copyright (c) 2009, Hendrik "Nevcairiel" Leppkes < h.leppkes at gmail dot com >
All rights reserved.
]]
if not HasMultiCastActionBar then return end
local classMask = UnitClassMask("player")
-- CoA: see MultiCastBar.lua — same gate, same fallback so the options
-- panel is registered for custom classes (e.g. Witchdoctor) too.
if not bit.contains(EnumUtil.CombineMasks(Enum.ClassMask.SHAMAN, Enum.ClassMask.HERO), classMask)
and not MultiCastActionBarFrame then
return
end
-- fetch upvalues
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
local Bar = Bartender4.Bar.prototype
local MultiCastMod = Bartender4:GetModule("MultiCast")
function MultiCastMod:SetupOptions()
if not self.options then
self.optionobject = Bar:GetOptionObject()
local enabled = {
type = "toggle",
order = 1,
name = L["Enabled"],
desc = L["Enable the Totem Bar"],
get = function() return self.db.profile.enabled end,
set = "ToggleModule",
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
name = L["General Settings"],
cmdInline = true,
order = 1,
args = {
enabled = enabled,
}
}
}
self.options = {
order = 100,
type = "group",
name = L["Totem Bar"],
desc = L["Configure the Totem Bar"],
childGroups = "tab",
}
Bartender4:RegisterBarOptions("MultiCast", self.options)
end
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end