I don't see why something like that wouldn't work. UNIT_DISPLAYPOWER is fired when the power type changes so you can catch than and then use UnitPowerType(unit) to check which bar you want hidden/displayed.
If you want to be able to check which bar you have you can always add a field to the bars like oUF_player.Power.BarNumber = 1 and 2 respectively.
|