$WOW_CAPTURE_SPELLS: seat a real spellbook in a capture
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
@@ -124,6 +124,32 @@ pub(super) fn seed_ui_fixture(
|
||||
}
|
||||
ctx.ui_seeded = true;
|
||||
|
||||
// `$WOW_CAPTURE_SPELLS=<id>[,<id>…]`: 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<u32> = 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() {
|
||||
|
||||
Reference in New Issue
Block a user