NE Stats v1.1.0
NE Stats v1.1.0
Changes since v1.0.6.
Merged pull requests
#60 chore: refresh WoW API docs (build 12.0.7.68256)
Automated WoW API doc refresh from Gethe/wow-ui-source (live). Does not touch ZhuraStats.toc, so no release is cut.
#61 feat: show live stats in combat instead of stale snapshot
What & why
In combat / M+ / encounter / PvP the stat APIs return Secret values that an addon cannot read, compare, or format in Lua. Until now we showed the last trustworthy snapshot, dimmed as stale. Instead, in those situations we now show the live value — stripped of any derived formatting.
The key: FontString:SetText / SetFormattedText accept a Secret argument even from a tainted addon (SecretArguments = "AllowedWhenTainted" in Blizzard's API) — the engine renders the number itself. "Hand it to the renderer" is not the same as "read it".
How
Stats.ReadSecretPassthrough(key)— one single-call live getter per stat. Returns the raw Secret only whenissecretvalueis true; the value itself is never inspected.Render.BuildSecretMeasuredStat— builds a stripped row[icon][label][value]and writes the raw Secret to the FontString viaSetFormattedTextat draw time.- Width/height are measured from a non-secret placeholder only. The Secret never touches the shared
measureLine: a FontString that has held secret text returns a Secret width/height afterwards, andSetTextdoes not clear that aspect — measuring it would poison every other row (a bug caught and fixed during in-game testing).
Behaviour
| Context | Display |
|---|---|
| In combat (Secret) | live number + %, no rating / DR / Archon arrows / stale dimming |
| Out of combat | unchanged — full formatting (rating, percent, DR, Archon, colors) |
| Durability / item level / gold | never Secret -> full formatting always, even in combat |
Always-on, no toggle (a profile option is easy to add if wanted).
Known limitations
- VERS shows only the rating-bonus component in combat; the passive/aura bonus (a second Secret that cannot be added) is dropped while restricted.
- MOVEMENT_SPEED needs
speed/7*100arithmetic, so it has no clean passthrough and stays on the snapshot. - With Archon reference in
tooltipmode, hovering a secret row in combat shows the reference with "your rating = 0" (not a crash).
Testing
- Verified in-game: live stats in combat, no errors; entering/leaving combat is correct.
- Syntax-checked all files (
loadfileunder Lua 5.1). - Added 4 unit tests for
ReadSecretPassthroughintests/test_stats.lua. busted/luacheckwere not run locally: the toolchain on this machine is broken (scoop Lua 5.4 without LuaFileSystem; incompatiblelfs.dllfor luacheck). Unrelated to this change. FontString rendering is not unit-testable and is verified in-game.
#62 fix(ci): read CurseForge metadata from a file to avoid semicolon mangling
Problem
The Release On Master Push workflow failed at Upload to CurseForge with:
{"errorCode":1002,"errorMessage":"Error in field `metadata`:\nInvalid JSON."}
Root cause
The metadata JSON is built correctly by jq (valid), but it is passed to curl inline:
-F "metadata=$metadata"curl's -F parses ; in the field value as form-field parameters (;type=, ;filename=). The auto-generated changelog contains semicolons (e.g. "no errors; entering...", "LuaFileSystem; incompatible..."), so curl splits the value at the first ; and CurseForge receives truncated/invalid JSON.
Confirmed by replaying the exact v1.1.0 release notes through the same -F form against httpbin: the received metadata field is corrupted.
Fix
Write the metadata to a file and have curl read the field value from the file:
jq -n ... > "$metadata_file"
-F "metadata=<$metadata_file;type=application/json"-F "name=<file" reads the value from the file content and does not scan it for ;/@/</newlines, so the changelog can contain anything. Also sets the part content type to application/json. Applied to both tag-release.yml and release.yml (identical step).
Releasing 1.1.0
The v1.1.0 GitHub release (auto-generated, which never reached CurseForge) has been deleted; the v1.1.0 tag is kept. Merging this PR re-runs the pipeline: the release no longer exists, the tag is reused (no new tag push), and the fixed CurseForge upload runs. Net result: 1.1.0 published to CurseForge, no version change.
Included commits
- fcfb34c chore: refresh WoW API docs (build 12.0.7.68256)
- fc1a54f feat: show live stats in combat instead of stale snapshot
- 053d35a chore: bump version to 1.1.0
- b468114 Merge branch 'master' into feature/in-combat-live-secret-stats
- ba3b372 Merge pull request #61 from zhuravlevkk/feature/in-combat-live-secret-stats
- 82adcdb fix(ci): read CurseForge metadata from a file to avoid semicolon mangling
- fc939de Merge pull request #62 from zhuravlevkk/fix/curseforge-metadata-json