fix: enable stance/state bars for CoA custom classes with shapeshift forms
Vanilla Bartender4 assumes only DRUID/WARRIOR/WARLOCK/PRIEST/ROGUE/HERO have
shapeshift forms. CoA custom classes (Witchdoctor, Templar, …) can register
forms late at runtime and aren't in the whitelist, so the stance/state bar
never came up for them.
StanceBar.lua:
- ApplyConfig() no longer Disable()s the module when GetNumShapeshiftForms()
is 0 at config time. A disabled module never re-enables on
UPDATE_SHAPESHIFT_FORMS, so late-registered forms were lost. We now just
hide the bar frame.
- Register UPDATE_SHAPESHIFT_FORMS and PLAYER_ENTERING_WORLD on the module
itself and re-Enable() / show the bar when forms appear after the fact.
Options/Bar.lua:
- The 'Hide in Stance/Form' visibility option was gated by a hard-coded
stanceClasses whitelist. Add an OR-fallback on GetNumShapeshiftForms() > 0
so CoA classes with forms get the UI.
StateBar.lua:
- DefaultStanceMap only had vanilla entries. For unknown classes with live
forms, synthesise a generic { id="formN", index=N } map at runtime so
UpdateStates() can wire stance-based action bar swaps.
This commit is contained in:
@@ -344,7 +344,10 @@ function Bar:GetOptionObject()
|
||||
name = L["Hide in Stance/Form"],
|
||||
desc = L["Hide this bar in a specific Stance or Form."],
|
||||
values = getStanceTable,
|
||||
hidden = function() return (not stanceClasses[class]) end,
|
||||
-- CoA: custom classes (Witchdoctor, Templar, …) may have forms
|
||||
-- but aren't in the vanilla stanceClasses whitelist. Show the
|
||||
-- option whenever the player currently has any form available.
|
||||
hidden = function() return (not (stanceClasses[class] or GetNumShapeshiftForms() > 0)) end,
|
||||
disabled = customEnabled,
|
||||
},
|
||||
customNl = {
|
||||
|
||||
Reference in New Issue
Block a user