settings boot at 1.12's defaults, and a cold loot no longer errors

- a setting's default is the reference's, enforced: eight player-facing options booted at something a stock client does not — `UnitNameNPC`, `UnitNameOwn`, `nameplateShowEnemies`, `ChatBubblesParty`, `cameraDistanceMaxFactor`, `QUEST_FADING_DISABLE`, `SHOW_BUFF_DURATIONS`, `SHOW_COMBAT_TEXT` — each a defensible "turn this on so I can see it while you build it" on its day and invisible as a set; the CVar table grows a mandatory `Reference` column (Same / Overridden / Deviates-with-reason) that a test checks in both directions, the FrameXML saved-variable store is compared against the reference's own `UIOptionsFrame.lua` off the chain (which found `SHOW_COMBAT_TEXT`, declared inside a table walked by a loop where a grep could not see it), and the wow-re census of all 214 `CVar::Register` sites folded in — `WorldDetail` back to `same`, since `GetWorldDetail` reads only `SmallCull` and the reference's own slider reads Medium at boot
- looting on a cold item cache raised `LootFrame.lua:85: attempt to index local 'color'` out of the stock window: `GetLootSlotInfo` answered nil where the reference answers cache-miss SENTINELS — quality −1 (which is exactly why stock `UIParent.lua` builds `ITEM_QUALITY_COLORS` over `for i = -1, 6`), "" for a name in flight, `INV_Misc_QuestionMark` for a display-info miss — and four values on every leg (`mov eax,4` at `0x4c2d07` is unconditional); `GetLootRollItemInfo` takes its own miss tail (`nil, nil, 1.0, 1.0, nil`), `GetItemQualityColor(-1)` reads Common because the compare is unsigned, and the window now WAITS for every item template before opening as `0x4c1cb0` does — there is no repaint path in 1.12 to fall back on, so deferring IS the mechanism
- the coin row is quality 0 (grey), not white — `0x4c23a0`'s coin leg falls to `xor eax,eax` before the item-cache read — and its icon walks the reference's six-step ladder (`0x6c6307`: one icon per decade of copper; two of the six were not in our set at all, and the pairs do not fall where "highest nonzero denomination" put them)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sam
2026-09-02 17:02:34 +07:00
co-authored by Claude Fable 5.1
parent 24fbb706f9
commit cac6e88145
27 changed files with 1611 additions and 434 deletions
+14 -8
View File
@@ -37,9 +37,11 @@ fn harness() -> UiScript {
load_xml(&s, "UIParent.xml");
load_xml(&s, "Cooldown.xml");
load_xml(&s, "ActionBar.xml"); // BENILLA_FALLBACK_ICON (the unknown-icon fallback)
// The timer switch, seeded BEFORE the bar loads. 1.12 declares it in UIOptionsFrame.lua
// (default "0"); we have no counterpart to that file, so it lives with the row that drives it
// (OptionsFrame.xml) and ships as "1" — the director's call, 0255/1139. Order matters: the
// The timer switch, PLANTED ON — not the shipped value. 1.12 declares it in
// UIOptionsFrame.lua (default "0"); we have no counterpart to that file, so it lives with the
// row that drives it (OptionsFrame.xml), where it shipped "1" from 0255/1139 until 1804 put
// it back on the reference's "0". These tests are about the timer text and the geometry it
// buys, so the harness turns it on the way the Interface page's row does. Order matters: the
// reference's `BuffFrame_OnLoad` calls `BuffButtons_UpdatePositions`, which seats the debuff
// row 20px differently depending on this value, so setting it afterwards leaves the bar laid
// out for the wrong one.
@@ -436,10 +438,11 @@ fn a_refreshed_duration_reaches_the_bar_with_no_aura_event() {
/// **`SHOW_BUFF_DURATIONS`** (decision 1139) — 0255 shipped the durations-shown geometry with no
/// switch because there was no panel to hang one on, and said the other branch was already there
/// waiting. This is it: the global (ours "1", the reference's "0") hides the timer text and closes
/// the 15px gutter each row leaves for it, down to the 5px the columns use. What it does NOT touch
/// is the warning flash — with the numbers gone, the pulse is the only thing left saying an aura is
/// about to drop, and the reference pulses from `BuffButton_OnUpdate` regardless of the setting.
/// waiting. This is it: the global — the reference's "0" since 1804, planted "1" by this file's
/// harness — hides the timer text and closes the 15px gutter each row leaves for it, down to the
/// 5px the columns use. What it does NOT touch is the warning flash — with the numbers gone, the
/// pulse is the only thing left saying an aura is about to drop, and the reference pulses from
/// `BuffButton_OnUpdate` regardless of the setting.
#[test]
fn the_duration_switch_hides_the_timers_and_closes_their_gutter() {
let _data = benilla_formats::wow_data_or_skip!();
@@ -458,7 +461,10 @@ fn the_duration_switch_hides_the_timers_and_closes_their_gutter() {
)],
);
frame(&mut s, 0.1);
assert!(shown(&s, "BuffButton0Duration"), "timers on by default");
assert!(
shown(&s, "BuffButton0Duration"),
"timers on — the harness planted the switch"
);
assert_eq!(text(&s, "BuffButton0Duration"), "19 s");
s.resolve();
let shown_gap = s