AdditionalPower Element Showing on Druid Feral/Guardian
greven opened this issue ยท 4 comments
Hey,
I don't play Druid nowadays but was revisiting some of my layout code and while testing I noticed that the AdditionalPower Element is showing for Feral / Guardian Druids but then the PostUpdate callback isn't working, therefore I can't, for instance, hide the Element when the Mana is at Max.
This has probably to do with the fact that on Blizzard Frames the Additional Power Bar doesn't show at all on Feral / Guardian but only on Moonkin Form. Tested on Moonkin and everything works as intended.
I don't know if this is a bug or an edge case where we need to deal with it ourselves in the layout, i.e., detecting if the Druid Spec is not Moonkin.
Thanks in advance.
Nuno.
I can use the OverrideVisibility, I just thought it would handle the difference between the Druid specs.
If it doesn't I can do that myself.
If we can add the alternate way of passing a list of specs that would work great too, so basically a way to override the default Blizzard one I guess.
Thanks p3lim.
The AdditionalPower element bases its visibility on ALT_MANA_BAR_PAIR_DISPLAY_INFO
, a table provided by the stock interface which looks like this:
ALT_MANA_BAR_PAIR_DISPLAY_INFO = {
DRUID = {
[Enum.PowerType.LunarPower] = true,
},
PRIEST = {
[Enum.PowerType.Insanity] = true,
},
SHAMAN = {
[Enum.PowerType.Maelstrom] = true,
},
};
This is mostly to further oUF's mantra of providing feature-parity with the stock UI's unit frames.
To make the element work with other combinations of classes and powers (or specs), you could override the element's Visibility method with self.AdditionalPower.OverrideVisibility
.
We could possibly add a way to allow layouts to add or remove combinations without having to override the whole Visibility method, let us know if that's of interest.
With that PR you could do the following:
-- show AdditionalPower in feral and guardian forms
self.AdditionalPower.displayPairs = CopyTable(ALT_MANA_BAR_PAIR_DISPLAY_INFO)
self.AdditionalPower.displayPairs.DRUID[Enum.PowerType.Rage] = true
self.AdditionalPower.displayPairs.DRUID[Enum.PowerType.Energy] = true