Conversation
Spells added by Spell ID render on EllesmereUI's own icon frames, so Blizzard's viewer never tinted them out of range. Add a per-spell Out of Range Coloring option (default Off) for those spells. When on, the range check is armed only if the spell has a range, and the icon is repainted on SPELL_RANGE_CHECK_UPDATE and PLAYER_TARGET_CHANGED with Blizzard's out-of-range color, outranking the resource dim. Events register on the first arm and drop when the last armed icon releases; override-range disarming now leaves ids a custom icon still holds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
Author
galadam4
marked this pull request as ready for review
September 14, 2026 16:02
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?
Spells added to a Cooldown Manager bar by Spell ID (the "Custom Spell ID" entry) render on EllesmereUI's own icon frames, because Blizzard's Cooldown Viewer has no frame for them. Blizzard's frames tint themselves when the target is out of range, but these icons never did, so a ranged custom spell looked castable from any distance.
This adds a per-spell Out of Range Coloring option (Off/On, default Off) to the right-click settings menu of spells added by Spell ID. When it is on, the icon uses Blizzard's own out-of-range color (
CooldownViewerConstants.ITEM_NOT_IN_RANGE_COLOR), and out of range takes priority over the existing resource dim, the same order as Blizzard'sRefreshIconColor. Racials and items are not offered the option. The setting is stored incustomActiveStates, like the other per-spell settings for custom spells.How it works:
CooldownViewerCooldownItemMixin. The range check is armed withC_Spell.EnableSpellRangeCheckonly whenC_Spell.SpellHasRangeis true, on the spell's live override id. Range is re-read withC_Spell.IsSpellInRangeonSPELL_RANGE_CHECK_UPDATEandPLAYER_TARGET_CHANGED. A secret or nil answer leaves the color alone.ns.TakeShell) taken on the first arm. They are unregistered when the last armed icon releases (icon hidden, or the option turned off).ArmOverrideRangeandDisarmOverrideRangesgot the matching check, so they never disable an id a custom icon holds.Note: CONTRIBUTING says feature requests are paused until a few weeks after 12.1. Opening this as a draft so it can wait for that, or be discussed first.
How was it tested?
luacwas not available locally.git diff --checkpassed..tools/extract-locale-keys.shwas run and_keys.txtis unchanged (the row labels go throughMakeSubnavRow's variableL()call).IsSpellInRangeandSpellHasRangeareSecretArguments = "AllowedWhenTainted".EnableSpellRangeCheckis"AllowedWhenUntainted", which only restricts secret arguments; the ids passed are plain numbers from saved settings. None of them are protected, andSPELL_RANGE_CHECK_UPDATEhas no secret payload flag.Screenshots
Not captured yet; pending in-game testing (before: the custom spell icon stays untinted out of range; after: it uses the red out-of-range tint).
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames - writes only the addon-owned custom spell icon texture; no hooks or scripts on Blizzard frames.🤖 Generated with Claude Code