diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2427a17 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Tests +on: [push, pull_request] +permissions: + contents: read +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + lua: ['5.1', '5.2'] + defaults: + run: + working-directory: addon + steps: + - uses: actions/checkout@v4 + with: + path: addon + - uses: actions/checkout@v4 + with: + repository: AlexAllocated/libchev + ref: 445c0cf5b3dd40d36461f6e0b9adc2feb8dfb16b + path: library + - run: sudo apt-get update && sudo apt-get install -y lua${{ matrix.lua }} + - run: lua${{ matrix.lua }} scripts/test.lua + - run: lua${{ matrix.lua }} scripts/test.lua . reverse + - run: python3 ../library/scripts/vendor.py . --check + - run: find . -name '*.lua' -exec luac${{ matrix.lua }} -p {} \; + - run: bash -n scripts/bump_version.sh && git diff --check diff --git a/CHANGELOG.md b/CHANGELOG.md index 0418218..74c5f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.2.0 — 2026-09-24 + +Declare current Classic client support and add six-client checks for category borders, native settings and cleanup. Keep Blizzard in control of native styles; all clients use the same guarded border implementation. + +Validation: 117 tests pass in both orders on Lua 5.1 and 5.2, with six client profiles, Lua parsing and exact private-library vendor checks. NoPoizen client smoke checks and package verification also pass. Live validation of the new adapters remains pending. + +See [CLIENT_COMPATIBILITY.md](CLIENT_COMPATIBILITY.md) for source evidence, scope and validation limits. + ## 1.1.1 — 2026-09-24 Keep overlapping debug consoles and their controls in one native stacking group through private libchev 1.1.3. Category menus stay with their owning console. diff --git a/CLIENT_COMPATIBILITY.md b/CLIENT_COMPATIBILITY.md new file mode 100644 index 0000000..32c15cd --- /dev/null +++ b/CLIENT_COMPATIBILITY.md @@ -0,0 +1,20 @@ +# PvPTogether client compatibility + +One source tree supports these current client families. Interface metadata permits loading; API capabilities still decide which adapter can run. PTR/beta builds in the same family use those adapters when their contracts match. This does not claim support for arbitrary historical/private-server clients. + +| Client family | Source snapshot | Interface targets | +| --- | --- | --- | +| Retail | Installed 12.1.0.69933 UI export | 120100 (existing older Retail targets retained) | +| Forever | Installed 1.60.1.69977 UI export; 1.60.1.70009 spell data | 16001 | +| Era / Hardcore / Season of Discovery | [1.15.9.69722](https://github.com/Gethe/wow-ui-source/tree/33e177d9bf38d76d5c6c6e05d5da78db1899659a) | 11509 | +| Anniversary / Burning Crusade | [2.5.6.69795](https://github.com/Gethe/wow-ui-source/tree/1463c686270b6c64e2c5c228f447c4597c0f8ba6) | 20506 | +| Mists Classic | [5.5.4.69934](https://github.com/Gethe/wow-ui-source/tree/cde55d0033e89b246381385b2f063cd6c6047ef8) | 50504 | +| Titan Reforged (China) | [3.80.2.69874](https://github.com/Gethe/wow-ui-source/tree/84ef503f0d2617494db84cc9c7e7b530e976f6e7) | 38001, 38002 | + +The Classic references are mirrored Blizzard UI/API source. Source inspection and offline fixtures establish expected contracts, not engine-level taint safety, rendering or gameplay validation. The user requested source-backed implementation without waiting to level a Forever rogue. Live poison application, expiry, charge exhaustion and audio checks remain pending; no live test result is inferred from these fixtures. No SavedVariables were changed externally. + +Every inspected client loads the common `Blizzard_NamePlates.xml` health bar at `UnitFrame.HealthBarsContainer.healthBar`, exposes `NamePlateBaseMixin:GetUnit()`, and registers `Settings.NAMEPLATE_OPTIONS_CATEGORY_ID`. No client-specific native style override is needed or restored. + +The same implementation attaches addon-owned category borders to permitted native health bars. It leaves native layout and CVars with Blizzard, guards secrets/forbidden/protected frames, rechecks recycled identities, and retains deferred cleanup. The settings shortcut opens each client's own global nameplate settings. Missing capabilities remain explicit rather than selecting behavior from interface number alone. + +Run `lua scripts/test.lua` and `lua scripts/test.lua . reverse` under Lua 5.1/5.2. `tests/clients.lua` covers each current family through border creation, friendly classification, native-settings navigation and disable cleanup, asserting no foreign-field writes, native geometry mutations, hooks or CVar writes. The existing suite covers restriction transitions, recycling, secret values and the shared console. diff --git a/CURSEFORGE_DESCRIPTION.md b/CURSEFORGE_DESCRIPTION.md index 932b31b..a227dd3 100644 --- a/CURSEFORGE_DESCRIPTION.md +++ b/CURSEFORGE_DESCRIPTION.md @@ -10,7 +10,7 @@ Open **Options → AddOns → PvPTogether** or use `/pt`. Each category has a bo - `/pt test` runs fifteen checks on detached private values and opens current results in the same debug console, with chat fallback when the window is unavailable. It does not exercise live nameplates or certify taint safety. - `/pvptogether` is an alias for `/pt`. -The same capability-driven implementation targets Retail and Forever. Borders use addon-owned textures attached to accessible native health bars. Protected or inaccessible regions wait until the client permits updates; cleanup retries when restrictions end. +The same capability-driven implementation targets Retail, Forever, Era/Hardcore/SoD, Anniversary/TBC, Mists Classic and Titan Reforged. Borders use addon-owned textures attached to accessible native health bars. Protected or inaccessible regions wait until the client permits updates; cleanup retries when restrictions end. Per-category style overrides have been retired. Old saved style preferences are preserved but ignored. Reload the UI after updating to let Blizzard rebuild its native layout. diff --git a/PvPTogether.toc b/PvPTogether.toc index ab7175d..00e2ff1 100644 --- a/PvPTogether.toc +++ b/PvPTogether.toc @@ -1,8 +1,12 @@ -## Interface: 120100, 16001 +## Interface: 120100, 16001, 11509, 20506, 50504, 38001, 38002 +## Interface-Vanilla: 11509 +## Interface-TBC: 20506 +## Interface-Mists: 50504 +## Interface-Titan: 38001, 38002 ## Interface-Mainline: 120100 ## Interface-Camelot: 16001 ## Title: PvPTogether -## Version: 1.1.1 +## Version: 1.2.0 ## Notes: Custom party, friendly, and enemy player nameplate borders. ## SavedVariablesPerCharacter: PvPTogetherDBChar ## Author: Chev diff --git a/scripts/test.lua b/scripts/test.lua index 017f320..76e46d0 100644 --- a/scripts/test.lua +++ b/scripts/test.lua @@ -4,7 +4,7 @@ -- runtime test patches a real Blizzard global, frame, mixin, or saved variable. local root = arg[1] or "." local harness = assert(loadfile(root .. "/tests/harness.lua"))()(root) -for _, suite in ipairs({ "core", "nameplates", "integration" }) do +for _, suite in ipairs({ "core", "nameplates", "integration", "clients" }) do assert(loadfile(root .. "/tests/" .. suite .. ".lua"))()(harness) end diff --git a/tests/clients.lua b/tests/clients.lua new file mode 100644 index 0000000..706f08e --- /dev/null +++ b/tests/clients.lua @@ -0,0 +1,39 @@ +return function(H) + -- The inspected Classic XML uses the same health container and base GetUnit + -- contract as Retail/Forever. Test the complete border and settings path for + -- each current family, including old globals being absent. + for client, version in pairs({ + retail = "12.1.0", + forever = "1.60.1", + era = "1.15.9", + tbc = "2.5.6", + mists = "5.5.4", + titan = "3.80.2", + }) do + H.test("client " .. client .. " borders, settings and cleanup", function() + local addon, state, env = H.new({ + options = true, + configure = function(e) + e.GetBuildInfo = function() + return version, "fixture", "", 0 + end + e.NamePlateSetupOptions, e.NamePlateConstants, e.NameplatesOverrides = nil, nil, nil + e.Settings.NAMEPLATE_OPTIONS_CATEGORY_ID = 37 + end, + }) + local base, unit = state:plate("nameplate1", { guid = "Player-1", isPlayer = true, isFriend = true }) + addon.isEnabled, addon.db.friendlyPlayerBorderEnabled = true, true + addon:EnsureNameplateEventFrame() + H.truthy(addon:RefreshNameplateFrame(base)) + H.truthy(addon.nameplateBorderTintByUnitFrame[unit].visible) + H.truthy(addon:OpenBlizzardNameplateSettings()) + H.equal(state.openCategory, 37) + addon:Disable() + H.falsy(addon.nameplateBorderTintByUnitFrame[unit].visible) + H.equal(state.foreignWrites, 0) + H.equal(state.nativeMutationAttempts, 0) + H.equal(#state.hooks, 0) + H.equal(#state.cvarWrites, 0) + end) + end +end