From 2f7cfcabf5fdb06f0393ccf3c4ea8348e25192d0 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 4 Sep 2026 20:54:27 +0700 Subject: [PATCH] the action bars are the reference's own, and a gift can be wrapped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the action-bar cluster is the reference's own: `MainMenuBar.xml`, `ActionBarFrame.xml`, `MultiActionBars.xml` and `BonusActionBarFrame.xml` run off the player's own chain, and our `ActionBar.xml` (2047 lines), `MultiBars.xml` and `StanceBar.xml` are deleted — three, since the stock bonus-bar file declares the shapeshift bar too; one engine verb, `ChangeActionBarPage`, fires `ACTIONBAR_PAGE_CHANGED` and nothing else; one load blocker: stock `MultiActionBars.lua` writes the options window's table from its OnLoad, the reference's own load-order hack, so our options window moves to the reference's toc slot; and ten things the reference does that ours did not: an empty button is HIDDEN while showgrid is 0, the bonus overlay sits one pixel right of the main buttons, every slide takes one frame more than its time, and `ActionButton_ShowGrid` ghosts EVERY ring, occupied included (1938) - a gift can be wrapped: right-clicking wrapping paper fell through to plain use and sent `CMSG_USE_ITEM`, so nothing happened — you could receive a gift and never give one; the wrap is a displayed-cursor MODE plus a stashed slot, never a payload, so `CursorHasItem()` stays false and every stock gate on it stays shut: right-click arms it, a left-click on a bag slot sends `CMSG_WRAP_ITEM`, and the client applies no eligibility test — the server's `ERR_CANT_WRAP_*` reasons are the error line (1934); a duration-limited item counts down: `SMSG_ITEM_TIME_UPDATE` parks a deadline and the tooltip's `ITEM_DURATION` line runs the enchant countdown's bucket ladder, so "Duration: 1 days" is what the reference renders; an update for an item we do not hold is DROPPED, no queue (1933); and a renamed crowd-control refusal names its mechanic — "Can't do that while stunned" — off `SpellMechanic.dbc` (1943) - a creature paths on a boat: `SMSG_MONSTER_MOVE_TRANSPORT` carries the transport's guid and deck-local coordinates, and is the attach/detach edge; a deck sample lands on the rider or nowhere, never as a world write a few yards from the map origin; and "there is no terrain under a boat" turned out wrong: the ground probe admits GameObject meshes — a boat's `.wmo` is a GameObject, so the probe hits the deck (1936); `MSG_MOVE_TIME_SKIPPED` is read, not dropped — the reference adds the lag to the observed unit's last-wire stamp, so dropping it scheduled their next packet `lag` ms late, a hitch for every player who stalled zoning in near us; and our own settle hold reports once (1935); and the tradeskill tool order was backwards — focus FIRST, so every two-tool recipe had read "Blacksmith Hammer, Anvil" for the reference's "Anvil, Blacksmith Hammer"; the focus's `hasTool` is 1.0 in the reference too (1942) - the crowd's second sitting, instruments first: the probe line carries the tail — cpu p95/p99 and the six worst frames — because a mean under budget hides the one frame in twenty over it (raid legs railed at 16.67 with p95 at 18–20 ms) and whether that frame was work or a wait is the first question about a stutter, and the visible meshes are counted by lane; then two cuts — a terrain tile furnishes as 4×4 cells of 4×4 chunks, one mesh, one entity, one draw per 133-yd cell instead of per 33-yd chunk (a city horizon is over a thousand chunks a frame, and a cell changes nothing a pixel can see; Stormwind 10.55 → 10.32 `cpu_ms`), and an authored point light is our own `WorldPointLight`, not Bevy's `PointLight`, which was only a data carrier while Bevy ran its whole light lane over every lamp, ~2 % of the alone frame; the sitting's record is 1945, and the code says so (1945) Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/ActionBar.xml | 2047 ----------------- crates/benilla-app/assets/ui/MicroMenu.xml | 7 + crates/benilla-app/assets/ui/MultiBars.xml | 532 ----- crates/benilla-app/assets/ui/OptionsFrame.xml | 232 +- crates/benilla-app/assets/ui/PetActionBar.xml | 3 +- crates/benilla-app/assets/ui/StanceBar.xml | 374 --- crates/benilla-app/assets/ui/UIParent.xml | 34 +- crates/benilla-app/assets/ui/UiPanels.xml | 5 + crates/benilla-app/assets/ui/benilla.toc | 157 +- crates/benilla-app/src/bindings/commands.rs | 17 +- crates/benilla-app/src/camera_shake.rs | 1 + crates/benilla-app/src/capture/fixtures.rs | 2 + .../src/capture/probes/live_fps.rs | 85 +- .../src/creature_anim/select/tests.rs | 2 + crates/benilla-app/src/cursor.rs | 12 +- crates/benilla-app/src/cvars.rs | 2 +- .../benilla-app/src/entities/carried_light.rs | 12 +- crates/benilla-app/src/items.rs | 154 +- crates/benilla-app/src/lib.rs | 2 +- crates/benilla-app/src/net.rs | 24 + crates/benilla-app/src/net/apply.rs | 33 +- crates/benilla-app/src/net/apply/objects.rs | 211 +- crates/benilla-app/src/net/io.rs | 9 + crates/benilla-app/src/net/motion/relay.rs | 19 + crates/benilla-app/src/net/motion/spline.rs | 59 +- crates/benilla-app/src/net/motion/tests.rs | 61 +- crates/benilla-app/src/player/controller.rs | 10 + crates/benilla-app/src/player/move_trace.rs | 14 + crates/benilla-app/src/player/movement_net.rs | 166 +- crates/benilla-app/src/player/server_ride.rs | 9 + crates/benilla-app/src/player/state.rs | 6 + crates/benilla-app/src/transport.rs | 73 + crates/benilla-app/src/ui_action/cast_fail.rs | 40 +- crates/benilla-app/src/ui_action/cast_send.rs | 11 +- crates/benilla-app/src/ui_action/errors.rs | 22 +- crates/benilla-app/src/ui_action/feed.rs | 36 +- crates/benilla-app/src/ui_action/mod.rs | 29 + crates/benilla-app/src/ui_action/state.rs | 132 +- crates/benilla-app/src/ui_char.rs | 13 +- crates/benilla-app/src/ui_craft.rs | 17 +- crates/benilla-app/src/ui_items/drain.rs | 96 + crates/benilla-app/src/ui_items/feed.rs | 9 +- crates/benilla-app/src/ui_net.rs | 2 +- .../src/ui_script/action_bar_tests.rs | 257 ++- crates/benilla-app/src/ui_script/bag_tests.rs | 18 +- .../benilla-app/src/ui_script/buff_tests.rs | 22 +- .../benilla-app/src/ui_script/cast_tests.rs | 8 + .../src/ui_script/character_tests.rs | 2 + .../benilla-app/src/ui_script/chat_tests.rs | 1 + .../src/ui_script/delete_item_tests.rs | 1 + .../benilla-app/src/ui_script/escape_tests.rs | 2 + .../src/ui_script/exp_bar_tests.rs | 19 +- .../benilla-app/src/ui_script/extract/mod.rs | 2 +- .../src/ui_script/game_menu_tests.rs | 12 +- .../src/ui_script/group_loot_tests.rs | 20 +- .../src/ui_script/help_frame_tests.rs | 8 +- .../src/ui_script/micro_menu_tests.rs | 10 +- crates/benilla-app/src/ui_script/mod.rs | 4 +- .../src/ui_script/multibar_stance_tests.rs | 401 +++- .../src/ui_script/options_tests.rs | 32 +- .../src/ui_script/perf_bar_tests.rs | 14 +- .../src/ui_script/pet_bar_tests.rs | 32 +- .../benilla-app/src/ui_script/reference_ui.rs | 86 +- .../src/ui_script/resolve_bench.rs | 2 +- .../src/ui_script/shipped_xml_tests.rs | 4 +- .../src/ui_script/spellbook_tests.rs | 23 +- .../src/ui_script/target_aura_tests.rs | 11 +- crates/benilla-app/src/ui_script/test_ui.rs | 12 +- .../src/ui_script/tooltip_anchor_tests.rs | 71 +- .../src/ui_script/tooltip_compare_tests.rs | 3 + .../src/ui_script/tot_frame_tests.rs | 7 +- .../src/ui_script/unit_popup_tests.rs | 5 +- crates/benilla-app/src/ui_shapeshift.rs | 3 +- crates/benilla-app/src/ui_tradeskill.rs | 36 +- crates/benilla-assets/src/adt.rs | 70 +- crates/benilla-assets/src/lib.rs | 2 +- crates/benilla-formats/src/lib.rs | 2 + crates/benilla-formats/src/spell_mechanic.rs | 107 + crates/benilla-protocol/src/events.rs | 22 + crates/benilla-protocol/src/events/decode.rs | 8 + .../benilla-protocol/src/messages/client.rs | 13 + crates/benilla-protocol/src/messages/items.rs | 69 +- crates/benilla-protocol/src/messages/mod.rs | 10 +- .../src/messages/monster_move.rs | 65 +- .../benilla-protocol/src/messages/movement.rs | 14 + .../benilla-protocol/src/messages/opcode.rs | 57 + .../benilla-protocol/src/messages/packet.rs | 27 +- crates/benilla-protocol/src/messages/parse.rs | 11 +- .../src/world/writer/items.rs | 17 + .../src/world/writer/self_movement.rs | 12 + .../benilla-protocol/tests/simple_packets.rs | 12 +- crates/benilla-ui/src/script/action.rs | 35 +- crates/benilla-ui/src/script/char_stats.rs | 5 + crates/benilla-ui/src/script/container.rs | 182 +- crates/benilla-ui/src/script/cursor.rs | 11 + crates/benilla-ui/src/script/cursor/doll.rs | 6 + crates/benilla-ui/src/script/mod.rs | 4 +- crates/benilla-ui/src/script/model.rs | 14 + crates/benilla-ui/src/script/region/paint.rs | 6 +- .../src/script/tests/tooltip_item/bindings.rs | 1 + crates/benilla-ui/src/script/tooltip/verbs.rs | 2 +- .../benilla-ui/src/script/tooltip_item/mod.rs | 20 +- .../src/script/tooltip_item/render.rs | 96 +- .../src/lighting/global_light.rs | 28 +- crates/benilla-world/src/lighting/mod.rs | 2 +- .../src/terrain_stream/furnish.rs | 34 +- .../src/terrain_stream/spawn/fx.rs | 24 +- 107 files changed, 3407 insertions(+), 3490 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/ActionBar.xml delete mode 100644 crates/benilla-app/assets/ui/MultiBars.xml delete mode 100644 crates/benilla-app/assets/ui/StanceBar.xml create mode 100644 crates/benilla-formats/src/spell_mechanic.rs diff --git a/crates/benilla-app/assets/ui/ActionBar.xml b/crates/benilla-app/assets/ui/ActionBar.xml deleted file mode 100644 index bd210cb5..00000000 --- a/crates/benilla-app/assets/ui/ActionBar.xml +++ /dev/null @@ -1,2047 +0,0 @@ - - - - - - - - - ActionButton_OnEvent() - BenillaActionButton_OnClick(self) - BenillaActionButton_OnDragStart(self) - BenillaActionButton_OnReceiveDrag(self) - ActionButton_OnUpdate(arg1) - BenillaActionButton_OnEnter(self) - if GameTooltip then GameTooltip:Hide() end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaExpBarOverlay_OnLoad() - - - - - - - BenillaExpBar_OnLoad(self) - BenillaExpBar_OnEvent(self) - BenillaExpBar_OnEnter(self) - BenillaExpBar_OnLeave(self) - ExhaustionTick_OnUpdate(arg1) - - if this:IsShown() and TextStatusBar_OnValueChanged then - TextStatusBar_OnValueChanged() - end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1) - - - - BenillaActionButton_OnLoad(self, 2) - - - - BenillaActionButton_OnLoad(self, 3) - - - - BenillaActionButton_OnLoad(self, 4) - - - - BenillaActionButton_OnLoad(self, 5) - - - - BenillaActionButton_OnLoad(self, 6) - - - - BenillaActionButton_OnLoad(self, 7) - - - - BenillaActionButton_OnLoad(self, 8) - - - - BenillaActionButton_OnLoad(self, 9) - - - - BenillaActionButton_OnLoad(self, 10) - - - - BenillaActionButton_OnLoad(self, 11) - - - - BenillaActionButton_OnLoad(self, 12) - - - - - - - - - - this:RegisterEvent("PLAYER_ENTERING_WORLD") - this:RegisterEvent("BAG_UPDATE") - - MainMenuBar_UpdateKeyRing() - - - - - - - - - - - - - - - - - - - - - - BenillaPerformanceBar_OnLoad(self) - BenillaPerformanceBar_OnUpdate(self, arg1) - - - - - BenillaActionBar_OnLoad(self) - BenillaActionBar_OnEvent(self) - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 2) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 3) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 4) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 5) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 6) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 7) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 8) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 9) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 10) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 11) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 12) self.isBonus = 1 - - - - BenillaBonusBar_OnLoad(self) - BonusActionBar_OnUpdate(arg1) - - - - - - diff --git a/crates/benilla-app/assets/ui/MicroMenu.xml b/crates/benilla-app/assets/ui/MicroMenu.xml index b0c77503..9ecd108f 100644 --- a/crates/benilla-app/assets/ui/MicroMenu.xml +++ b/crates/benilla-app/assets/ui/MicroMenu.xml @@ -85,6 +85,13 @@ - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 2, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 3, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 4, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 5, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 6, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 7, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 8, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 9, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 10, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 11, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - BenillaActionButton_OnLoad(self, 12, BENILLA_MULTIBAR_BOTTOMLEFT_BASE, "MULTIACTIONBAR1BUTTON") - - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 2, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 3, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 4, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 5, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 6, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 7, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 8, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 9, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 10, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 11, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - BenillaActionButton_OnLoad(self, 12, BENILLA_MULTIBAR_BOTTOMRIGHT_BASE, "MULTIACTIONBAR2BUTTON") - - - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 2, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 3, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 4, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 5, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 6, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 7, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 8, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 9, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 10, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 11, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - BenillaActionButton_OnLoad(self, 12, BENILLA_MULTIBAR_RIGHT_BASE, "MULTIACTIONBAR3BUTTON") - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 2, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 3, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 4, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 5, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 6, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 7, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 8, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 9, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 10, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 11, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - BenillaActionButton_OnLoad(self, 12, BENILLA_MULTIBAR_LEFT_BASE, "MULTIACTIONBAR4BUTTON") - - - - diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 7aa4871e..9ee7e028 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -190,6 +190,111 @@ - - - - - - - - - - - - - - - - - - - - - - - BenillaShapeshiftButton_OnClick(self) - BenillaShapeshiftButton_OnEnter(self) - BenillaShapeshiftButton_OnLeave(self) - - - - - - - - - - - - - - - - - - - - BenillaShapeshiftButton_OnLoad(self, 1) - - - - BenillaShapeshiftButton_OnLoad(self, 2) - - - - BenillaShapeshiftButton_OnLoad(self, 3) - - - - BenillaShapeshiftButton_OnLoad(self, 4) - - - - BenillaShapeshiftButton_OnLoad(self, 5) - - - - BenillaShapeshiftButton_OnLoad(self, 6) - - - - BenillaShapeshiftButton_OnLoad(self, 7) - - - - BenillaShapeshiftButton_OnLoad(self, 8) - - - - BenillaShapeshiftButton_OnLoad(self, 9) - - - - BenillaShapeshiftButton_OnLoad(self, 10) - - - - ShapeshiftBar_OnLoad() - ShapeshiftBar_OnEvent() - - UIParent_ManageFramePositions() - UIParent_ManageFramePositions() - - - diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml index 7d9d9705..ebfead66 100644 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ b/crates/benilla-app/assets/ui/UIParent.xml @@ -74,8 +74,8 @@ XML anchor: every layout pass re-anchors it to a base offset plus per-bar deltas - either bottom multibar, the pet/stance bar, the reputation watch bar - fired from those bars' OnShow/OnHide (ref BonusActionBarFrame.xml:350-355 et al.) and applied once at - startup. The loader's post-load call (ui_script/mod.rs) is our startup seam; the stance - bar's OnShow/OnHide (StanceBar.xml) is the one live re-fire today. + startup. The loader's post-load call (ui_script/mod.rs) is our startup seam; the pet + bar's OnShow/OnHide and the options rows' setters (1938) are the live re-fires today. Departures, each named: - Lua 5.1 dialect (the 1.12 client ran 5.0): pairs() iteration, table.insert for @@ -207,7 +207,7 @@ -- `CMSG_SET_ACTIONBAR_TOGGLES` and waits for the field to come back (wow-re -- `system/ui/scratch/action-bar-toggles.md` §5: the setter's every store is into its own -- stack frame, and nothing in the binary fires on a change to that byte). So the live UI - -- state is the four Lua globals `MultiBars.xml` owns, and `GetActionBarToggles()` is read + -- state is the four Lua globals stock `MultiActionBars.lua` reads, and `GetActionBarToggles()` is read -- exactly ONCE, here, to seed them. Reading it again later would fight the optimistic -- value the options rows just set and lose a round trip's worth of clicks. -- @@ -810,6 +810,12 @@ -- while the stance bar is up starts 20px past the last stance button. That case is -- rare but real — a possessed or charmed unit gives a pet bar to a class that also -- has forms. + -- Update shapeshift bar appearance — ref UIParent.lua l.1705-1732, the reference's own + -- arm of this pass: with the bottom-left bar up the stance bar loses its shelf (end + -- caps + middle strip) and its rings shrink to 50; otherwise the shelf shows (the + -- middle only past two forms) and the rings are 64. Stock BonusActionBarFrame.lua + -- carries a `ShapeshiftBar_UpdatePosition` with the same body that nothing calls; the + -- pass IS the caller. (Our StanceBar.xml did this through a listener until 1938.) local bottomLeftUp = MultiBarBottomLeft and MultiBarBottomLeft:IsShown() if ( SlidingActionBarTexture0 and SlidingActionBarTexture1 ) then if ( bottomLeftUp ) then @@ -820,6 +826,28 @@ SlidingActionBarTexture1:Show() end end + if ( ShapeshiftBarFrame ) then + local numForms = GetNumShapeshiftForms and GetNumShapeshiftForms() or 0 + if ( bottomLeftUp ) then + ShapeshiftBarLeft:Hide() + ShapeshiftBarRight:Hide() + ShapeshiftBarMiddle:Hide() + for i=1, numForms do + getglobal("ShapeshiftButton"..i.."NormalTexture"):SetWidth(50) + getglobal("ShapeshiftButton"..i.."NormalTexture"):SetHeight(50) + end + else + if ( numForms > 2 ) then + ShapeshiftBarMiddle:Show() + end + ShapeshiftBarLeft:Show() + ShapeshiftBarRight:Show() + for i=1, numForms do + getglobal("ShapeshiftButton"..i.."NormalTexture"):SetWidth(64) + getglobal("ShapeshiftButton"..i.."NormalTexture"):SetHeight(64) + end + end + end if ( PetActionBarFrame ) then PETACTIONBAR_XPOS = 36 local forms = GetNumShapeshiftForms and GetNumShapeshiftForms() or 0 diff --git a/crates/benilla-app/assets/ui/UiPanels.xml b/crates/benilla-app/assets/ui/UiPanels.xml index aa92c6c3..32e4f5d0 100644 --- a/crates/benilla-app/assets/ui/UiPanels.xml +++ b/crates/benilla-app/assets/ui/UiPanels.xml @@ -24,6 +24,11 @@ its comment names the reference row it stands in for. -->