Skip to content

Fix(Unit Frames): lock Forever druid combo points until Cat Form - #3431

Open
svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:forever-druid-blank-class-power
Open

svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:forever-druid-blank-class-power

Conversation

@svart2521

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a blank combo point row on the WoW Forever player frame for druids who have not learned Cat Form yet. The Forever default class resource style is Modern, so every new druid sees an empty strip above the health bar that can never fill.

Cause: on Forever the player frame treats every druid as having combo points. With the row placed above the health bar, the frame reserves its space, but the pips only show in Cat Form, which a druid without the spell can never enter.

Fix:

  • EllesmereUI.ForeverDruidLacksCat() (EllesmereUI_Presets.lua) is one shared check: a Forever druid who does not know Cat Form. It returns false for every other class and on Retail.
  • Unit Frames: ClassPowerEntry returns no class resource while it holds, so no row is built and no space is reserved. A SPELLS_CHANGED watcher, created only for such a druid, builds the row once Cat Form is learned (deferred through the combat queue in combat), refreshes the options page and unregisters itself.
  • Options: Unit Frames "Enable Class Resource" and Resource Bars "Show Class Resource" are greyed out with a "Learn Cat Form to use combo points." tooltip and read as off, so the rows under them stay hidden. On the Resource Bars page, "Hide Power Bar if Resource" is greyed out and the cursor anchor row hidden the same way. Saved settings are never changed, so the player's choice returns once Cat Form is learned.

Resource Bars needed no runtime change: on Forever it only shows combo points in Cat Form.

Cost: one inert event frame on SPELLS_CHANGED, only for a Forever druid without Cat Form, gone once the spell is learned. Nothing on Retail or for any other class.

Screenshots

Before:
image

After:
image
image
image

How was it tested?

Client: Forever

  • Druid without Cat Form: no blank row on the player frame; "Enable Class Resource" (Unit Frames) and "Show Class Resource" (Resource Bars) are greyed out and off.
  • Guardrails and the locale-key check pass.

Checklist

  • New settings default OFF (no behavior change without opt-in) - N/A: no new settings
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no tickers; nothing built beyond an inert event frame or combat queue - the watcher exists only for a Forever druid without Cat Form
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations)
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

## What does this PR do?

Fixes a blank combo point row on the WoW Forever player frame for druids who have not learned Cat Form yet. The Forever default class resource style is Modern, so every new druid sees an empty strip above the health bar that can never fill.

Cause: on Forever the player frame treats every druid as having combo points. With the row placed above the health bar, the frame reserves its space, but the pips only show in Cat Form, which a druid without the spell can never enter.

Fix:
- `EllesmereUI.ForeverDruidLacksCat()` (`EllesmereUI_Presets.lua`) is one shared check: a Forever druid who does not know Cat Form. It returns false for every other class and on Retail.
- Unit Frames: `ClassPowerEntry` returns no class resource while it holds, so no row is built and no space is reserved. A `SPELLS_CHANGED` watcher, created only for such a druid, builds the row once Cat Form is learned (deferred through the combat queue in combat), refreshes the options page and unregisters itself.
- Options: Unit Frames "Enable Class Resource" and Resource Bars "Show Class Resource" are greyed out with a "Learn Cat Form to use combo points." tooltip and read as off, so the rows under them stay hidden. On the Resource Bars page, "Hide Power Bar if Resource" is greyed out and the cursor anchor row hidden the same way. Saved settings are never changed, so the player's choice returns once Cat Form is learned.

Resource Bars needed no runtime change: on Forever it only shows combo points in Cat Form.

Cost: one inert event frame on `SPELLS_CHANGED`, only for a Forever druid without Cat Form, gone once the spell is learned. Nothing on Retail or for any other class.

## How was it tested?

Client: Forever

- Druid without Cat Form: no blank row on the player frame; "Enable Class Resource" (Unit Frames) and "Show Class Resource" (Resource Bars) are greyed out and off.
- Guardrails and the locale-key check pass.

## Checklist

- [x] New settings default **OFF** (no behavior change without opt-in) - N/A: no new settings
- [x] Zero cost while disabled: no events registered, no polling, no hooks doing work, no tickers; nothing built beyond an inert event frame or combat queue - the watcher exists only for a Forever druid without Cat Form
- [x] Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations)
- [x] No writes onto Blizzard-owned frames (weak-table pattern used); `HookScript`/`hooksecurefunc` only, never `SetScript` on Blizzard frames
- [x] Tested in-game on live; no version gates or pre-Midnight APIs added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant