Skip to content

fix(cdm): count Demonic Healthstones on the Healthstone preset and refresh charges at once - #2258

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
lkshrk:fix/2154-healthstone-count
Sep 27, 2026
Merged

EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
lkshrk:fix/2154-healthstone-count

Conversation

@lkshrk

@lkshrk lkshrk commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #2154.

  • Healthstone preset counts Demonic Healthstones. With Pact of Gluttony, self-conjured stones are Demonic Healthstones (224464), so the Healthstone icon showed 0 for warlocks with the talent. The preset now counts both stones and shows their sum. The combat lockout stays keyed to 6262 (Demonic stones are reusable in combat), and the separate Demonic Healthstone preset is unchanged.
  • The count updates as soon as a charge is used or refilled. A used or refilled charge moves no bag contents, so no BAG_UPDATE fires; the new count only becomes readable with BAG_UPDATE_COOLDOWN, 0.3-1.4 s after the cast. The cast's fast-lane pass had already read the old count by then, so the icon stayed stale until an unrelated edge re-armed it (seconds, or much longer out of combat). BAG_UPDATE_COOLDOWN now re-reads the shown non-pot item counts, arms only on a real change, and bypasses the 1 Hz drain cap the same way a cast does.

How was it tested?

Live, retail build 69933, warlock with Pact of Gluttony, this diff applied to v9.2.9 (same logic as this branch).

  • Used a Demonic Healthstone three times, conjured with Create Healthstone, and took stones from a Soulwell: the count updated once the server applied the charge.
  • Timing captured with a temporary event probe (not part of this PR): the charge change was readable at BAG_UPDATE_COOLDOWN 0.29-0.41 s after use or conjure and 1.37 s after the Soulwell pickup; before this change the count read had already been consumed at that point.
  • Not tested: holding a regular Healthstone from another warlock's Soulwell together with Demonic ones (the summing path).

Screenshots

N/A, not a visual change: the existing count text shows the correct number.

Checklist

  • New settings default OFF (no behavior change without opt-in) -- N/A, no new settings; bug fix
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built -- N/A, no setting; no new events registered (BAG_UPDATE_COOLDOWN was already registered)
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) -- the recheck reads counts of shown non-pot item presets only and arms only on a real change
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

…fresh charges at once

Pact of Gluttony turns self-conjured Healthstones into Demonic Healthstones,
so the Healthstone preset showed 0 for warlocks with the talent. The preset
now lists 224464 as a family alternate and, with the new countAllAlts flag,
always shows the sum, since a warlock can hold both stones.

Using or refilling a Healthstone charge moves no bag contents, so no
BAG_UPDATE fires; the new count only becomes readable with
BAG_UPDATE_COOLDOWN, 0.3-1.4 s after the cast. The cast's fast-lane pass had
already read the old count by then, so the icon stayed stale until an
unrelated edge re-armed it. BAG_UPDATE_COOLDOWN now re-reads the shown
non-pot item counts, arms only on a real change and bypasses the 1 Hz cap
like a cast does.

Fixes EllesmereGaming#2154
@EllesmereGaming
EllesmereGaming merged commit 426e701 into EllesmereGaming:main Sep 27, 2026
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.

CDM: Demonic Healthstone and Healthstone are separate presets, so the count is wrong when talented

2 participants