promotional bannermobile promotional banner

MH Custom Tags (ElvUI Plugin)

Custom tags for use across ElvUI

File Details

v11

  • R
  • May 20, 2026
  • 232.00 KB
  • 83
  • 12.0.5
  • Retail

File Name

ElvUI_mhTags-v11.zip

Supported Versions

  • 12.0.5

lightweight tag eff5629bc0e75831ec3b0c20b12d03814ec2a4ca v11
Author:    GitHub <noreply@github.com>
Date:    Wed May 20 18:21:07 2026 -0400

commit 6f03f5edc649db6bcd8da4b922c49c262622c78f
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 17:10:51 2026 -0400

    fix(absorb): hide (0) via TruncateWhenZero + WrapString on secret path

    UnitGetTotalAbsorbs returns secret values universally in 12.0+, so the
    zero-comparison path is unreachable for live units. The secret branch
    now relies entirely on TruncateWhenZero + WrapString (ElvUI [absorbs]
    pattern) to gate display; AbbreviateNumbers is skipped there because
    it always emits "0" for secret zeros. Non-secret path still abbreviates.

commit 6f03f5edc649db6bcd8da4b922c49c262622c78f
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 17:10:51 2026 -0400

    fix(absorb): hide (0) via TruncateWhenZero + WrapString on secret path

    UnitGetTotalAbsorbs returns secret values universally in 12.0+, so the
    zero-comparison path is unreachable for live units. The secret branch
    now relies entirely on TruncateWhenZero + WrapString (ElvUI [absorbs]
    pattern) to gate display; AbbreviateNumbers is skipped there because
    it always emits "0" for secret zeros. Non-secret path still abbreviates.

commit 6a810e35df1ee95a6248f10f866e77f64996143d
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 11:15:13 2026 -0400

    fix(absorb): gate secret zeros with WrapString and keep abbreviated display

    TruncateWhenZero + WrapString suppress zero/secret-zero absorbs without
    comparing secret strings in Lua; AbbreviateNumbers still formats the value.
    Also restore Interface 120005 (WoW 12.0.5) after incorrect 120007 bump.

commit 6b3a49deb8bb5c39a4686248e8ac53c6146653e5
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 10:33:36 2026 -0400

    fix(absorb): suppress (0) when TruncateWhenZero returns empty string

    TruncateWhenZero returns "" for zero absorb, not nil; the old truthiness
    check never short-circuited and AbbreviateNumbers still formatted "(0)".

commit 08686f8295199e70e31324c77f704810221b2851
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 09:35:36 2026 -0400

    docs: target WoW 12.0.7 (Interface 120007)

    Bump TOC Interface and X-WoW-Version to 12.0.7. Update README,
    changelog, and /mhtags debug text to match the current Retail patch.

commit 7fd8221353a36d3f3faed65eea48b5a18e984d96
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 09:34:39 2026 -0400

    docs: prepare v11 release metadata

    Bump addon version to 11 in TOC and core.lua. Add concise v11 changelog
    entry covering the ColorCurve health gradient tag, core refactor, absorb
    fix, and API cleanup. Update README midnight notes and popular examples
    for the restored gradient prefix tag.

commit f2c569bb4571351e9a93dc20c4d5dd68fe9fe04f
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 09:05:10 2026 -0400

    feat(color): add secret-safe health gradient prefix tag

    Restore health-percent text coloring for Midnight using Blizzard's
    ColorCurveObject API. Numeric percent + Lua table lookup cannot work
    when UnitHealthPercent returns displayable secret values; evaluating
    UnitHealthPercent(unit, false, colorCurve) produces a ColorMixin that
    GenerateHexColor() can turn into a text color prefix.

    - Add mh-color-health-gradient prefix tag (composes with any health tag)
    - Build HEALTH_COLOR_CURVE from emerald palette stops at load:
      emerald-red (0%), emerald-yellow (50%), emerald-green (100%)
    - Export MHCT.EMERALD_HEX aligned with mh-color-emerald-* static tags
    - Fall back to emerald-green when curve evaluation fails

commit 63cb9e188959218db51e1672418ca0611d098234
Author: masomh-personal <masom@hamadeh.io>
Date:   Wed May 20 09:05:05 2026 -0400

    chore: ignore agent-tools scratch directory

    Prevents temporary agent research files from appearing as untracked
    changes in the repo.

commit 1922cdd764af9278770765ada95115165a8bee35
Author: masomh-personal <masom@hamadeh.io>
Date:   Tue May 19 20:52:51 2026 -0400

    docs: remove resolved known issue for absorb (0) display

    C_StringUtil.TruncateWhenZero now suppresses secret-zero absorb values,
    so the "(0)" display in restricted contexts is no longer a known limitation.

commit 58d1ad603af77c00fa932491a97d22ac4952ba83
Author: masomh-personal <masom@hamadeh.io>
Date:   Tue May 19 20:52:43 2026 -0400

    refactor(tags): remove duplication and delegate to core helpers

    health.lua
    - Remove local getAbsorbText and formatPercentValue; use MHCT.getAbsorbText and
      MHCT.FormatPercent throughout all absorb/percent tags
    - Remove MHCT.E dependency entirely; switch mh-health-deficit and
      mh-health-deficit-nostatus from E:ShortValue (ElvUI "15K" style) to
      MHCT.FormatLargeNumber (AbbreviateNumbers "15k") for visual consistency with
      mh-health-current and all other health tags
    - Remove pcall closure from mh-health-deficit-percent; branch directly on
      percentIsSecret returned by GetHealthPercent

    power.lua
    - Remove local PERCENT_FORMATS; formatPowerPercent delegates to MHCT.FormatPercent

    name.lua
    - Remove local getValidName and formatName; all name tags use
      MHCT.getUnitNameSafe / MHCT.getFormattedUnitName
    - Use MHCT.parseDecimalArg consistently for mh-name-abbrev-if-long tags

    combined.lua
    - Remove local getFormattedName; getClassificationNameLevel uses
      MHCT.getFormattedUnitName for secret/nil/empty guard and CAPS+shorten
    - Replace inline max-level comparison with MHCT.isAtMaxLevelTogether
    - Remove now-unused MAX_PLAYER_LEVEL local

    classification.lua
    - Remove local BOSS_COLOR, ELITE_COLOR, RARE_COLOR; reference MHCT.COLORS

    misc.lua
    - Remove local canCompareLevels and duplicate level-comparison logic; both
      mh-smartlevel and formatDifficultyLevel delegate to MHCT.isAtMaxLevelTogether
    - Remove local issecretvalue and MAX_PLAYER_LEVEL (no longer needed)
    - Remove orphan placeholder comment
    - Fix incorrect header comment that claimed absorb/level APIs are unaffected by
      secret value restrictions (the absorb (0) bug proved otherwise)

    color.lua
    - Simplify validateHexColor regex from six explicit character classes to %x%x%x%x%x%x

commit 482cb64d72b1f9f147b245a0184ca03dde565cf3
Author: masomh-personal <masom@hamadeh.io>
Date:   Tue May 19 20:52:27 2026 -0400

    refactor(core): centralize shared helpers and align with WoW 12.0+ APIs

    - Add MHCT.COLORS table (STATUS, BOSS, RARE, ELITE) so tag files share one
      source of truth for classification/status colors instead of redefining them
    - Add MHCT.getAbsorbText: absorb display helper with C_StringUtil.TruncateWhenZero
      to suppress secret-zero "(0)" in rated PvP/encounter contexts (12.0.5+ fix)
    - Add MHCT.getUnitNameSafe / MHCT.getFormattedUnitName: centralize the secret/nil
      guard, strupper, and ShortenString that name.lua and combined.lua duplicated
    - Add MHCT.isAtMaxLevelTogether: single predicate for "both player and unit are
      confirmed max level" — replaces identical canCompareLevels logic that existed
      independently in misc.lua and combined.lua
    - Simplify GetHealthPercent/GetPowerPercent: resolve CURVE_SCALE_TO_100 path once
      at load time (if/else at module level) so each tag call has no runtime branch
    - Simplify getSafeBooleanState: remove pcall wrapper; 12.0+ boolean APIs return
      secret values rather than erroring, making pcall overhead unnecessary
    - Simplify FormatLargeNumber: AbbreviateNumbers is AllowedWhenTainted in 12.0+
      and accepts secret values natively — pcall and legacy fallback removed
    - Remove dead MHCT exports: issecretvalue (every tag file localizes the global
      directly), MHCT.L (no tag file ever consumed it), MHCT.CURVE_SCALE_TO_100
      (baked into GetHealthPercent/GetPowerPercent at load, no external use)
    - Replace stale ElvUI version comments on statusCheck/classificationType with
      accurate docstrings describing actual secret-value behaviour