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.
This commit is contained in:
@@ -7,9 +7,14 @@ if not HasMultiCastActionBar then return end
|
|||||||
|
|
||||||
local classMask = UnitClassMask("player")
|
local classMask = UnitClassMask("player")
|
||||||
|
|
||||||
if not bit.contains(EnumUtil.CombineMasks(Enum.ClassMask.SHAMAN, Enum.ClassMask.HERO), classMask) then
|
-- CoA: the SHAMAN/HERO mask check doesn't know about CoA custom classes
|
||||||
|
-- (e.g. Witchdoctor, which also uses the totem bar). Fall back to the
|
||||||
|
-- game-created MultiCastActionBarFrame: if the engine produced it for this
|
||||||
|
-- player, we wrap it regardless of class.
|
||||||
|
if not bit.contains(EnumUtil.CombineMasks(Enum.ClassMask.SHAMAN, Enum.ClassMask.HERO), classMask)
|
||||||
|
and not MultiCastActionBarFrame then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- fetch upvalues
|
-- fetch upvalues
|
||||||
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ if not HasMultiCastActionBar then return end
|
|||||||
|
|
||||||
local classMask = UnitClassMask("player")
|
local classMask = UnitClassMask("player")
|
||||||
|
|
||||||
if not bit.contains(EnumUtil.CombineMasks(Enum.ClassMask.SHAMAN, Enum.ClassMask.HERO), classMask) then
|
-- 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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user