fix(raidframes): honor class color in live health-bar background#412
Closed
nulltyto wants to merge 1 commit into
Closed
fix(raidframes): honor class color in live health-bar background#412nulltyto wants to merge 1 commit into
nulltyto wants to merge 1 commit into
Conversation
The class-color background option (Raid Frames > Health Bar > Background) worked in the preview but reverted to the custom color on live frames. The preview and reload paths use ns.GetBgColor (which honors bgClassColored), but the live update paths (UpdateButton, _UpdateButtonHealth) called ns._ApplyHealthBg, which hardcoded s.customBgColor. Since UNIT_HEALTH fires constantly in combat, _ApplyHealthBg repainted the custom color over the class tint set at reload. Route the alive/online branch through ns.GetBgColor so the live path stays in lockstep with the preview/reload paths. Fixes party and raid (both call sites already pass the correctly-resolved settings proxy).
Owner
|
i actually already fixed this locally was about to push the patch D: sorry! |
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.
Problem
The class-color background option (Raid Frames → Health Bar → Background) shows correctly in the options preview but reverts to the Custom Background Color on live party/raid frames in-game (reproduced in a dungeon).
Cause
The preview and reload paths use
ns.GetBgColor, which honors thebgClassColoredtoggle. But the live update paths —UpdateButtonand_UpdateButtonHealth— both callns._ApplyHealthBg, which hardcodeds.customBgColorand never checkedbgClassColored.Because
UNIT_HEALTHfires constantly in combat,_ApplyHealthBgrepaints the custom color over the class tint that the reload path had set — so the frame never holds the class color while you're actually playing.Fix
Route the alive/online branch of
_ApplyHealthBgthroughns.GetBgColor(unit, s), keeping the live path in lockstep with the preview/reload paths.GetBgColorreturnsr,g,b,a(alpha =bgDarkness) and is secret-value safe.Both
_ApplyHealthBgcall sites already pass the correctly-resolved settings proxy (ns._scaledPartyProxyfor party,ns._scaledProfilefor raid), so this fixes both party and raid with one change. The dark health-color mode and dead/offline status tints are untouched.Testing
luac -p) passesbgDarknessslider still affects the class-colored bgBug report: https://discord.com/channels/585577383847788554/1517963435776671774