From a033f13f0f9640b34a7503ba30e27d2e97e53a0e Mon Sep 17 00:00:00 2001 From: grom Date: Thu, 5 Nov 2026 11:48:54 -0700 Subject: [PATCH] `$WOW_CAPTURE_SPELLS`: seat a real spellbook in a capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A capture never logs in, so its spellbook is whatever a fixture hardcodes — and a whole class of addon is driven by what is IN that book. Advanced Trade Skill Window finds the player's professions by walking spell tab 1 and matching each spell's icon against its own thirteen `Interface\Icons\…` leaves, so with no profession spell seated it finds nothing, draws no tab and switches nothing: indistinguishable from the defect being chased. With it, grom's report reproduces offline. The realm's own ids are in the comment — Survival is **46050**, a profession 1.12 does not have and the one his screenshot is of — and seating 46050,2550,3273,2018,2656 builds five named, shown, correctly-icon'd tabs, which is how the icon match was cleared as the cause of *"I can't switch to other professions."* Added to the fixture's own book rather than replacing it, so every existing scenario still reads as it did. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn --- crates/benilla-app/src/capture/fixtures.rs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/crates/benilla-app/src/capture/fixtures.rs b/crates/benilla-app/src/capture/fixtures.rs index f474d786..f479cf7e 100644 --- a/crates/benilla-app/src/capture/fixtures.rs +++ b/crates/benilla-app/src/capture/fixtures.rs @@ -124,6 +124,32 @@ pub(super) fn seed_ui_fixture( } ctx.ui_seeded = true; + // `$WOW_CAPTURE_SPELLS=[,…]`: spells added to whatever book the fixture seats. + // + // A capture never logs in, so its spellbook is whatever a fixture hardcodes — and a whole + // class of addon is driven by what is IN that book. Advanced Trade Skill Window finds the + // player's professions by walking tab 1 and matching each spell's icon against its own list + // (`Professions`, thirteen `Interface\Icons\…` leaves), so with no profession spell seated + // it finds nothing, draws no tab and switches nothing — which is indistinguishable from the + // defect being chased. The realm's own ids: Survival 46050, Jewelcrafting 30220, and 1.12's + // own Alchemy 2259, Blacksmithing 2018, Cooking 2550, Enchanting 7411, Engineering 4036, + // First Aid 3273, Leatherworking 2108, Tailoring 3908, Smelting 2656. + // + // Added rather than replacing, so a scenario's own book still reads as it did. + if let Ok(list) = std::env::var("WOW_CAPTURE_SPELLS") { + let extra: Vec = list + .split(',') + .filter_map(|s| s.trim().parse().ok()) + .collect(); + if !extra.is_empty() { + info!( + "capture: $WOW_CAPTURE_SPELLS seats {} extra spell(s)", + extra.len() + ); + actions.spells.extend(extra); + } + } + // A UI capture with no script VM would be a UI-less world under the scenario's name, so it // exits non-zero, as the window-size refusal does. if script.is_none() {