Wire up HSPRecoveriesCapture to populate affectedrecovery#104
Open
rodarvus wants to merge 1 commit into
Open
Conversation
The HSPRecoveriesCapture trigger fired on every row of the
{recoveries hsp} sub-section of "slist hsp" output -- but had no
script attribute and no capture groups, so the rows were silently
gagged. The slist recovery state was never propagated to
Spellups["RT"]["affectedrecovery"].
Add capture groups (rc, name, seconds_remaining) and a script
RecoveriesUpdate that writes the row into affectedrecovery: a non-zero
seconds value sets the entry, a zero value clears it. This makes the
slist refresh the authoritative source for affectedrecovery, which
heals any stale entries that might be left over from earlier bugs
(see the recon/recoff nil-guard PR) and lets a fresh plugin install or
mid-session reconnect inherit the player's current recovery state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
HSPRecoveriesCaptureinSpellupRecast/Hadar_Spellups.xmlfires on every row of the{recoveries hsp}sub-section thatslist hspemits after the spell list — but the trigger had no capture groups and noscriptattribute, so the rows were silently gagged from output and never parsed. The completeslist hspoutput looks like:The
{recoveries hsp}rows tell us the current state of each recovery group from the server's point of view.Spellups["RT"]["affectedrecovery"]is supposed to mirror that state, but the only writers wererecon()/recoff()reacting to live events — meaning a plugin reload, fresh install, or any mid-session reconnect inherited stale or missing recovery state until the next live transition.This PR adds capture groups to the trigger regex, wires it to a new
RecoveriesUpdatescript that writes each row intoaffectedrecovery, and makes the slist refresh the authoritative source for that table.Diff overview
Trigger:
New function next to
SlistUpdate:Why this matters now
A companion PR (#103) fixes a crash in
recon/recoffthat could leave stale entries inaffectedrecoveryand persist them to disk. Wiring upRecoveriesUpdatemeans that even users who had stale entries from before the crash fix will see their state self-heal on the next slist refresh, instead of needing to manually delete the plugin state file.It also fixes the long-standing case where a fresh install or reconnect mid-recovery had no way to learn about active recoveries until each one individually ended and
{recoff}fired.Test plan
HSPRecoveriesStartenablesCaptureandEnd,Enddisables all three. Adding a script toCaptureonly changes per-row behavior; lifecycle unchanged.wildcards[1](rc) andwildcards[3](seconds) are guarded withtonumberand nil-checks.slist hsp(auto-fires onchar.status), confirmaffectedrecoveryreflects current server state. Confirmaffofffor affected spell groups correctly skips recast during cooldown.🤖 Generated with Claude Code