diff --git a/crates/benilla-app/src/ui_script/action_bar_tests.rs b/crates/benilla-app/src/ui_script/action_bar_tests.rs index 168a3201..5668cf74 100644 --- a/crates/benilla-app/src/ui_script/action_bar_tests.rs +++ b/crates/benilla-app/src/ui_script/action_bar_tests.rs @@ -573,8 +573,15 @@ fn a_cooldown_count_draws_over_the_bonus_bars_sweep() { consumable: false, }), ); + // Driven the way the server drives it, not by a bare `Show()`: an offset, then + // `UPDATE_BONUS_ACTIONBAR`. Both halves are needed. The event is what runs + // `ActionButton_Update` on the bonus row, and only there does a button register the cooldown + // event at all — inside the `HasAction` arm (`ActionButton.lua:137-155`) — so a bar merely + // shown carries no action and never hears `ACTIONBAR_UPDATE_COOLDOWN`. And the offset is what + // keeps the bar up: the event's own handler hides it again when `GetBonusBarOffset()` is 0. + s.set_bonus_bar_offset(1); s.fire_event("PLAYER_ENTERING_WORLD", vec![]); - s.run("BonusActionBarFrame:Show()").unwrap(); + s.fire_event("UPDATE_BONUS_ACTIONBAR", vec![]); s.tick(10.0); s.set_action_state( 73, @@ -1700,10 +1707,12 @@ fn bonus_bar_slides_up_with_sound_and_down_without() { .into_iter() .map(|u| (u.action, u.on_self)) .collect::>(), - vec![(73, false)], - "the BONUS branch of stock ActionButtonUp passes a literal 0 for onSelf (ActionButton.lua:38) \ - — in a stance, ALT-1 drives the bonus page without self-cast; the reference's own rule, \ - not the (73, true) a self-cast would give" + vec![(73, true)], + "the realm unified `ActionButtonUp`: one body picks the bonus or the normal button and \ + then passes the caller's own `onSelf` through to `UseAction` \ + (`ActionButton.lua:27-46`). Stock 1.12 had a separate BONUS branch that handed `UseAction` \ + a literal 0, so ALT-1 in a stance drove the bonus page *without* self-casting — that \ + quirk is gone, and a self-cast binding self-casts on the bonus bar too." ); s.run("BonusActionBarFrame:Hide() ActionButtonDown(1) ActionButtonUp(1, 1)") .unwrap(); diff --git a/crates/benilla-app/src/ui_script/test_ui.rs b/crates/benilla-app/src/ui_script/test_ui.rs index d4a22266..aab3bd74 100644 --- a/crates/benilla-app/src/ui_script/test_ui.rs +++ b/crates/benilla-app/src/ui_script/test_ui.rs @@ -107,11 +107,17 @@ const PREREQS: &[(&str, &[&str])] = &[ ], ), ( + // The `.xml` only. It brings its own `