From 14bd5ea1a48e5efa7fecb078f41bc85fce3f299b Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 31 Aug 2026 20:18:51 +0700 Subject: [PATCH] the bank is the reference's own window, and far sight freezes your body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the bank window is the reference's own `BankFrame.xml` run off the player's chain — our 890-line copy is deleted whole; putting bags into the bank's bag slots works (the two verbs its buttons are wired to now exist), the purse is a real `SmallMoneyFrameTemplate` splitting 987654321 copper into three coin buttons instead of one string, `BANKFRAME_OPENED` loses the argument the real client never fires, and the bank stops auto-opening your bags while the vendor and mailbox keep doing it; the empty-slot click still plays the bag sound, because the reference's own line plays it on every click the cursor did not consume — named as faithful rather than quietly fixed - underneath it, the bank's inventory band is a VIEW over the container feed, not a second copy — inventory ids 40..69 had answered nil because the doll array stops at 24, so the stock file swapped in would have drawn an empty bank; the six bank bag slots become real inventory slots (64..=69) fed off the player descriptor, the three bag verbs are carved from the binary (`PutItemInBackpack` IS `PutItemInBag(0xFF)` through a ten-byte thunk, the occupied-by-an-ordinary-item leg auto-stores with no destination slot at all, and the return is the Lua number 1 or nil — the nil being the whole reason a plain left-click opens a bag), and the swap caught `BankButtonIDToInvSlotID`'s bag arm six slots wrong: it took a bag number 1..6 where the reference passes the button's own id, which is the container id - far sight freezes your own body while the view is out — the fifth conjunct of the movement predicates' shared precondition, joining the health term so the walk, the turn and the follow teardown go down together; both halves are load-bearing: the `IsActivePlayer` half is what keeps a Mind Control victim walking (possession rides the same PLAYER_FARSIGHT field), and the latch half is the RESOLVED engage rather than the raw field — and the camera is untouched, you still look around freely, which is the whole point of the spell - the reset offer no longer outlives the character that earned it — log out after walking out of the Deadmines and your next character was offered a reset the first one had earned — and the one lockout leg no probe can ever reach (vmangos writes a last-instance map only from raid binds, which the client's handler discards as not-a-party-dungeon) is now covered end to end through the real system, its module doc saying plainly: tested and never observed Co-Authored-By: Claude Fable 5 --- crates/benilla-app/assets/ui/BankFrame.xml | 889 ------------------ .../benilla-app/assets/ui/CharacterFrame.xml | 6 +- .../assets/ui/ItemButtonTemplate.xml | 29 +- .../benilla-app/assets/ui/QuestLogFrame.xml | 4 +- crates/benilla-app/assets/ui/StackSplit.xml | 8 +- crates/benilla-app/assets/ui/UiPanels.xml | 30 + crates/benilla-app/assets/ui/benilla.toc | 37 +- crates/benilla-app/examples/addon_harness.rs | 2 +- crates/benilla-app/src/capture/fixtures.rs | 55 +- crates/benilla-app/src/net.rs | 10 + crates/benilla-app/src/net/io.rs | 5 + crates/benilla-app/src/player/controller.rs | 20 +- crates/benilla-app/src/player/follow.rs | 36 +- crates/benilla-app/src/player/state.rs | 280 ++++-- crates/benilla-app/src/ui_bank.rs | 61 +- crates/benilla-app/src/ui_char.rs | 117 ++- crates/benilla-app/src/ui_instance.rs | 140 ++- crates/benilla-app/src/ui_items/drain.rs | 62 ++ crates/benilla-app/src/ui_items/mod.rs | 5 +- crates/benilla-app/src/ui_script/bag_tests.rs | 5 +- .../benilla-app/src/ui_script/bank_tests.rs | 274 ++++-- .../src/ui_script/frame_flag_gate.rs | 6 - .../benilla-app/src/ui_script/panel_tests.rs | 47 +- crates/benilla-app/src/ui_script/test_ui.rs | 5 +- .../src/world/writer/items.rs | 12 + crates/benilla-ui/src/script/bank.rs | 203 +++- crates/benilla-ui/src/script/char_stats.rs | 141 ++- crates/benilla-ui/src/script/container.rs | 23 + crates/benilla-ui/src/script/cursor.rs | 2 + .../benilla-ui/src/script/cursor/bag_verbs.rs | 589 ++++++++++++ crates/benilla-ui/src/script/cursor/doll.rs | 28 +- crates/benilla-ui/src/script/mod.rs | 6 +- crates/benilla-ui/src/script/model.rs | 10 + .../src/script/tests/layout_gate.rs | 2 +- crates/benilla-ui/src/script/tooltip/mod.rs | 2 +- 35 files changed, 1804 insertions(+), 1347 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/BankFrame.xml create mode 100644 crates/benilla-ui/src/script/cursor/bag_verbs.rs diff --git a/crates/benilla-app/assets/ui/BankFrame.xml b/crates/benilla-app/assets/ui/BankFrame.xml deleted file mode 100644 index 9ad0efbb..00000000 --- a/crates/benilla-app/assets/ui/BankFrame.xml +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - BenillaBankBagButton_OnClick(self) - BenillaBankBagButton_OnEnter(self) - GameTooltip:Hide() - BenillaBankBagButton_Place(self) - BenillaBankBagButton_Place(self) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaBankBagButton_OnLoad(self, 1) - - - - BenillaBankBagButton_OnLoad(self, 2) - - - - BenillaBankBagButton_OnLoad(self, 3) - - - - BenillaBankBagButton_OnLoad(self, 4) - - - - BenillaBankBagButton_OnLoad(self, 5) - - - - BenillaBankBagButton_OnLoad(self, 6) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BankFrame_OnLoad() - BankFrame_OnEvent(event) - - OpenBackpack(); PlaySound("igMainMenuOpen") - CloseBankBagFrames(); CloseBankFrame(); CloseBackpack(); PlaySound("igMainMenuClose") - - - - diff --git a/crates/benilla-app/assets/ui/CharacterFrame.xml b/crates/benilla-app/assets/ui/CharacterFrame.xml index 42f4d6ca..e9e5251d 100644 --- a/crates/benilla-app/assets/ui/CharacterFrame.xml +++ b/crates/benilla-app/assets/ui/CharacterFrame.xml @@ -1024,7 +1024,7 @@ -- reference (PaperDollFrame.xml:20-25 routes OnDragStart/OnReceiveDrag to the same -- OnClick("LeftButton", ignoreModifiers=1) the plain click uses) — see -- BenillaPaperDollSlot_OnClick below for the identical routing, the bag slots' own - -- precedent (BagFrame.xml's BenillaBagSlot_OnClick). + -- precedent (the reference's ContainerFrameItemButton_OnClick, sourced since 1751). button:RegisterForDrag("LeftButton") else button:RegisterForClicks("LeftButtonUp") @@ -1095,7 +1095,7 @@ button.broken = textureName and GetInventoryItemBroken("player", button.invSlotId) -- A locked slot (its item is up on the cursor, or a send is still pending -- server-side, decision 0216 §4/0218 §3) dims — the bag slots' own vertex-dim - -- convention (BagFrame.xml's BenillaBagSlot_Update), applied here instead of the + -- convention, applied here instead of the -- ref's separate SetItemButtonDesaturated call (no engine equivalent — header -- comment). The transient drag-dim outranks the broken red on the icon. if IsInventoryItemLocked(button.invSlotId) then @@ -1272,7 +1272,7 @@ The shared equipment-slot button (ref PaperDollItemSlotButtonTemplate inherits ItemButtonTemplate, ref-PaperDollFrame.xml:4-38 — ItemButtonTemplate's own XML isn't part of this session's extraction, so its shape is taken from this codebase's own prior - reconstruction of it, BagFrame.xml's BenillaBagSlotTemplate: 37x37, a BACKGROUND icon fill, + reconstruction of it (BagFrame.xml's since-retired BenillaBagSlotTemplate): 37x37, a BACKGROUND icon fill, an OVERLAY count, the 64x64 UI-Quickslot2 ring centered (0,-1), UI-Quickslot-Depress pushed, ButtonHilight-Square ADD highlight — duplicated here rather than cross-file inherited so this window's slot behavior (UNIT_INVENTORY_CHANGED refresh, tooltip) stays self-contained in one diff --git a/crates/benilla-app/assets/ui/ItemButtonTemplate.xml b/crates/benilla-app/assets/ui/ItemButtonTemplate.xml index 20039646..10f1002b 100644 --- a/crates/benilla-app/assets/ui/ItemButtonTemplate.xml +++ b/crates/benilla-app/assets/ui/ItemButtonTemplate.xml @@ -70,20 +70,23 @@ never the behaviour; it was two XML declarations, because the reference ships its templates in `ContainerFrame.xml` and that file is not in the sourced set. - So the chain costs what it actually costs: this Button, and `ContainerFrameItemButtonTemplate` - in ContainerFrameAdapters.xml beside the adapter that already wraps one of those very handlers. - Our own bag windows keep `BenillaBagSlotTemplate` and are untouched — that is our design (0216), - a thousand lines of it, and this template is the reference's PUBLISHED surface for addons that - build their own slots. Two things that look alike because they do the same job; only one of them - is an API. + So the chain cost what it actually cost: this Button, and — at the time — a transcribed + `ContainerFrameItemButtonTemplate` beside the adapter that already wrapped one of those very + handlers. **Decision 1751 then took the last step and made both moot for the windows + themselves**: `Interface\FrameXML\ContainerFrame.xml` is a manifest entry now, so the + reference's OWN declaration of that template is the live one and the transcription is deleted. + This Button stays, because it is the reference's PUBLISHED surface for addons that build their + own slots and it has to exist whether or not any window of ours uses it. - **The bank arm is NOT here, and this is the omission, not an oversight** (1134 §4). - `BankItemButtonGenericTemplate` inherits `BankItemButtonTemplate` (BankFrame.xml l.-), whose - handlers — `BankFrameItemButton_OnLoad`, `_OnEvent`, `BankFrameItemButtonGeneric_OnClick` — - live in `BankFrame.lua`, which is NOT sourced, and whose OnEnter calls `this:GetInventorySlot()`, - a widget method we do not bind. That is the real unit of work the paragraph above thought it was - describing. pfUI reaches it only for `bag == -1`, so its bag arm works and its bank arm raises - where it raises today. + **The bank arm resolves too, since 1751's second window.** `BankItemButtonGenericTemplate` + inherits `BankItemButtonTemplate`, whose handlers live in `BankFrame.lua` — and that file + arrives through `Interface\FrameXML\BankFrame.xml`'s own `