Repository navigation
Conversation
## What does this PR do? Fixes the FocusKick "Interrupt Spell" setting resetting to None when switching between classes on the same profile, which also stopped the focus cast sound from playing ([bug EllesmereGaming#367](https://ellesmereui.com/bugs/367/focuskick-spell-setting-not-saved-between-classes)). Cause: the pick was one value on the profile's FocusKick bar data, shared by every class using that profile. Picking Pummel on a Warrior replaced Disrupt on a Demon Hunter; back on the Demon Hunter the stored spell was not castable, so the dropdown showed None and the cast sound had no interrupt to check. Fix: - `ns.GetFocusKickPick` / `ns.SetFocusKickPick` (`EUI_CDM_FocusKick.lua`) store the pick per class in `focusKickInterruptByClass` (spell id, `"any"` for Any Cast, or `0` for None). The cast sound, its arming check and the options dropdown all read and write through them. - Retail healer specs without a kick (all healers except Restoration Shaman) get their own slot, so they never inherit the class's kick. They can still pick Any Cast or None. The spec list is the existing FOCUS reminder table, moved into a shared `ns.IsNoKickHealerSpec()` that the reminder now uses too. WoW Forever has no specs, so there it is always the plain class. - A class with no saved pick falls back to the old profile-wide value, still validated against the spellbook, so the class that set it last keeps working with no re-pick. Nothing is written on login. Cost: none added; the lookups run only on the options dropdown, the proxy refresh and a tracked unit's cast. ## How was it tested? Client: Retail - Reporter: Disrupt on a Demon Hunter and Pummel on a Warrior on the same profile, each keeps its own pick and the cast sound plays on both, across multiple relogs and client restarts. - Characters with nothing set log in without errors and keep the old fallback. - 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 - [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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the FocusKick "Interrupt Spell" setting resetting to None when switching between classes on the same profile, which also stopped the focus cast sound from playing (bug #367).
Cause: the pick was one value on the profile's FocusKick bar data, shared by every class using that profile. Picking Pummel on a Warrior replaced Disrupt on a Demon Hunter; back on the Demon Hunter the stored spell was not castable, so the dropdown showed None and the cast sound had no interrupt to check.
Fix:
ns.GetFocusKickPick/ns.SetFocusKickPick(EUI_CDM_FocusKick.lua) store the pick per class infocusKickInterruptByClass(spell id,"any"for Any Cast, or0for None). The cast sound, its arming check and the options dropdown all read and write through them.ns.IsNoKickHealerSpec()that the reminder now uses too. WoW Forever has no specs, so there it is always the plain class.Cost: none added; the lookups run only on the options dropdown, the proxy refresh and a tracked unit's cast.
How was it tested?
Client: Retail
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames