feat: Health-based fading — fade frames above configurable health threshold - #6
Closed
X-Steeve wants to merge 1 commit into
Closed
feat: Health-based fading — fade frames above configurable health threshold#6X-Steeve wants to merge 1 commit into
X-Steeve wants to merge 1 commit into
Conversation
Contributor
|
using cool idea but imo very risky for something that could break with any patch |
DanderBot
added a commit
that referenced
this pull request
Apr 10, 2026
Replaces the scaffolded stubs with the full cast-lifecycle
implementation. Debug output via DF:Debug("TARGETEDLIST", ...) is
used as a stand-in for visual bars until commit #5 lands the render
pipeline — this lets in-game verification happen against the debug
console without requiring the full rendering work first.
All 13 correctness gotchas from the TS3 cross-reference in
_Reference/targeted-spells-findings.md are handled and tagged inline:
#1 0.2s delay before reading cast data (start events fire before
UnitSpellTargetName / duration are populated)
#2 Cast-ID matching at both pickup (via UnitCastingInfo) and stop
(via event castGuid) — prevents rapid-restart flicker
#3 UNIT_SPELLCAST_SUCCEEDED during an active channel is treated
as a no-op (channel tick, not a stop)
#4 INTERRUPTED with nil interrupter or a dead caster is treated
as a normal stop (no interrupter flash)
#6 Empower spellId/castGuid offset handled (same shape as regular
start on current retail — documented inline)
#7 Interrupter lookup via UnitNameFromGUID / UnitClassFromGUID
#8 Uninterruptible flag from UnitCastingInfo/UnitChannelInfo is
treated as secret-tainted and only ever fed to
SetVertexColorFromBoolean (applied in commit #5)
#9 UNIT_SPELLCAST_INTERRUPTIBLE / NOT_INTERRUPTIBLE overwrite the
stored uninterruptible field with a clean boolean
#11 LOADING_SCREEN_DISABLED triggers a full release sweep
Also adds the cast-targeting filter pipeline:
* TargetedList_IsRelevantCaster filters out non-nameplate units,
friendly units, and party-member nameplates
* TargetedList_ReadCastData unifies UnitCastingInfo / UnitChannelInfo
read paths, handling the positional offset difference for
castID vs notInterruptible between the two APIs
* Important-spells filter via C_Spell.IsSpellImportant
* Hide-own-casts filter
* Roster name cache used for O(1) target lookup
Event dispatcher extended to route NAME_PLATE_UNIT_ADDED and
UNIT_TARGET through the start handler so new nameplates and mid-cast
target swaps are picked up. UNIT_TARGET also fires an immediate stop
to drop the old tracking — the 0.2s delayed re-pickup recreates it
if the new target is still a party member.
Content-type filter (gotcha #13) is intentionally deferred to
commit #5 since the existing TargetedSpells content-type detection
can be reused rather than duplicated.
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
Replaces the scaffolded stubs with the full cast-lifecycle
implementation. Debug output via DF:Debug("TARGETEDLIST", ...) is
used as a stand-in for visual bars until commit DanderBot#5 lands the render
pipeline — this lets in-game verification happen against the debug
console without requiring the full rendering work first.
All 13 correctness gotchas from the TS3 cross-reference in
_Reference/targeted-spells-findings.md are handled and tagged inline:
#1 0.2s delay before reading cast data (start events fire before
UnitSpellTargetName / duration are populated)
DanderBot#2 Cast-ID matching at both pickup (via UnitCastingInfo) and stop
(via event castGuid) — prevents rapid-restart flicker
DanderBot#3 UNIT_SPELLCAST_SUCCEEDED during an active channel is treated
as a no-op (channel tick, not a stop)
DanderBot#4 INTERRUPTED with nil interrupter or a dead caster is treated
as a normal stop (no interrupter flash)
DanderBot#6 Empower spellId/castGuid offset handled (same shape as regular
start on current retail — documented inline)
DanderBot#7 Interrupter lookup via UnitNameFromGUID / UnitClassFromGUID
DanderBot#8 Uninterruptible flag from UnitCastingInfo/UnitChannelInfo is
treated as secret-tainted and only ever fed to
SetVertexColorFromBoolean (applied in commit DanderBot#5)
DanderBot#9 UNIT_SPELLCAST_INTERRUPTIBLE / NOT_INTERRUPTIBLE overwrite the
stored uninterruptible field with a clean boolean
DanderBot#11 LOADING_SCREEN_DISABLED triggers a full release sweep
Also adds the cast-targeting filter pipeline:
* TargetedList_IsRelevantCaster filters out non-nameplate units,
friendly units, and party-member nameplates
* TargetedList_ReadCastData unifies UnitCastingInfo / UnitChannelInfo
read paths, handling the positional offset difference for
castID vs notInterruptible between the two APIs
* Important-spells filter via C_Spell.IsSpellImportant
* Hide-own-casts filter
* Roster name cache used for O(1) target lookup
Event dispatcher extended to route NAME_PLATE_UNIT_ADDED and
UNIT_TARGET through the start handler so new nameplates and mid-cast
target swaps are picked up. UNIT_TARGET also fires an immediate stop
to drop the old tracking — the 0.2s delayed re-pickup recreates it
if the new target is still a party member.
Content-type filter (gotcha DanderBot#13) is intentionally deferred to
commit DanderBot#5 since the existing TargetedSpells content-type detection
can be reused rather than duplicated.
DanderBot
pushed a commit
that referenced
this pull request
Jul 11, 2026
… inside the button subtree onUpdateMode=disabled propagates through the whole subtree, so an OnUpdate/ AnimationGroup on a button descendant installs but never ticks. The prior note claimed the opposite (the probe only checked SetScript/Play don't error). Point to the external-driver pattern (DF.Border ensureDriver, secretRect -> UIParent).
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.
Summary
Adds a Health Threshold Fading option: frames or elements can be faded when a unit's health is above a configurable threshold (e.g. 100% or 80%). This helps highlight damaged units and reduce visual clutter from full-health ones.
Main changes
New module
Features/HealthFade.luaOnValueChangedreceives the resolved value (safe with secret health).UpdateHealthFade/UpdatePetHealthFadeto update fade state.DF:GetHealthFadeAlpha(frame, elementKey)for per-element alpha, used byElementAppearance.lua.Integration in the appearance pipeline (
ElementAppearance.lua)healthFadeAlpha).hfElementSpecific): per-element alpha (health bar, background, name/health text, auras, icons, dispel overlay, power bar, missing buff, defensive icon, targeted spell, my buff indicator).Options (
Config.lua,Options.lua)hfCancelOnDispel).healthFade,hf).Core (
Frames/Core.lua)SetHealthBarValue, a hidden bardfHealthCheckBaris created and receives the same percentage; itsOnValueChangedupdatesdfComputedAboveThresholdand triggersUpdateHealthFade.Range (
Features/Range.lua)UpdateHealthFade/UpdatePetHealthFadeso fade state stays in sync with the range timer.Export / Debug / Test
fullHealthFade*,fh*) so frame-level and element-specific behaviour can be previewed.Files changed
Config.lua,DandersFrames.toc,ExportCategories.luaFeatures/ElementAppearance.lua,Features/HealthFade.lua(new),Features/Range.luaFrames/Core.luaOptions/Options.luaDebug/PerformanceTest.lua,TestMode/TestMode.lua