Skip to content

Fix Health Deficit + Abbreviate (K/M) not working outside Test Mode#22

Open
andybergon wants to merge 1 commit intoDanderBot:mainfrom
andybergon:fix/deficit-abbreviation
Open

Fix Health Deficit + Abbreviate (K/M) not working outside Test Mode#22
andybergon wants to merge 1 commit intoDanderBot:mainfrom
andybergon:fix/deficit-abbreviation

Conversation

@andybergon
Copy link

@andybergon andybergon commented Mar 18, 2026

The C_StringUtil code path always took priority over the abbreviation logic in all three deficit update functions. Since C_StringUtil APIs are always available in modern WoW, the db.healthTextAbbreviate + AbbreviateNumbers() branch was never reached — making the Abbreviate checkbox effectively do nothing for Deficit mode.

The fix sets the text via TruncateWhenZero + WrapString first (which correctly handles zero deficit with tainted/secret values), then checks GetText() truthiness to conditionally overwrite with the abbreviated form. This avoids comparing tainted values while preserving both abbreviation and zero-deficit hiding.

Tested in raid (tainted values) and outside instances.

Before

image

After

image

The C_StringUtil code path always took priority over the abbreviation
logic. Since C_StringUtil APIs are always available, the
db.healthTextAbbreviate + AbbreviateNumbers branch was never reached.

Fix: set the text via TruncateWhenZero + WrapString first (which
correctly hides zero deficit even with secret/tainted values), then
check GetText() truthiness to conditionally overwrite with the
abbreviated form. This avoids comparing tainted values (which errors
in instanced content) while preserving both abbreviation and zero
hiding.
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