Files
benilla-octo/crates/benilla-app/assets/ui/ItemSlotButtonTemplates.xml
T
SamandClaude Fable 5.1 6da7ed3fca the action bars' empty slots go ghost, and a rooted creature stays put
- picking a spell up off the bar no longer blacks out every empty slot: `UI-Quickslot` is a FILLED 60%-black plate, not a hollow ring (decoded off the shipped BLPs — Quickslot2's interior is RGBA 0,0,0,0, Quickslot's 0,0,0,153), and the reference dims it to half alpha in `ActionButton_ShowGrid`, so an empty well now ghosts at 30% black where it read as a hole; the wow-re cross-check then found the reference never UN-dims it (a 3-argument `SetVertexColor` preserves the current alpha at `0x79abd0`, and `SetNormalTexture` reuses the region), so in the real client the first drag leaves every button's border at half alpha for the rest of the session — benilla ends the dim on purpose and records it as the divergence it is (1782)
- the bag bar is the reference's own `MainMenuBarBagButtons.xml` (window 3 of the stock-first migration), and the swap found a real bug rather than a move: the reference's `ItemAnim_OnEvent` matches a push against the button's inventory-slot id (20..23) and benilla emitted its own container numbering (1..4), so all four bag-push cards would have silently never played against the stock body — `push_container` now emits the reference's selector (`bag + 1`), which is what an addon expects anyway; beside it, a readiness probe that asks the LOADER, not a grep, which of the 85 stock windows load off the player's chain today (58 do; the 27 that don't name their own blocker)
- a rooted, hovering, water-walking or walking creature reached benilla as an unhandled opcode: the twelve `SMSG_SPLINE_MOVE_*` (the observer twin of the ack'd force family — bare packed guid, no ack, any unit) now decode into one MOVEMENTFLAGS word per unit, which benilla kept for our mover and for a relayed player and not at all for a creature, the one body this family is ever addressed to; ROOT wipes the direction bits so the dead-reckon stops walking a rooted body on for its next heartbeat (`0x7c7340`), HOVER clears a yard off the floor without climbing a body already inside that yard (`0x636e81`), WATERWALK elects the liquid surface against the terrain, SAFE_FALL's terminal is 7.0 not 60.148 (`0x7c5d23`), and SET_RUN_MODE's bool is inverted against the bit, folded at the parse; the inspect card names a unit's granted modes in words (`granted rooted+hover`) so a creature resting a yard off the floor reads as intended rather than broken

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 16:57:55 +07:00

77 lines
4.9 KiB
XML

<!--
The reference's item-SLOT button templates: `PaperDollItemSlotButtonTemplate` (PaperDollFrame.xml
l.4-38) and `BagSlotButtonTemplate` (MainMenuBarBagButtons.xml l.17-53), which inherits it. Both
sit on `ItemButtonTemplate` (ItemButtonTemplate.xml), so the chain is
ItemButtonTemplate <- PaperDollItemSlotButtonTemplate <- BagSlotButtonTemplate
and all three are now declared, in that order, across three files the toc loads in that order.
**Why they are here rather than in CharacterFrame.xml and BagFrame.xml, where their subjects
live.** Load order, and only load order: BagFrame.xml (toc l.241) comes BEFORE
CharacterFrame.xml (l.256), so a bag template declared in the former could not inherit a doll
template declared in the latter. Neither is consumed by our own windows — our doll slots and our
four bag-bar slots are hand-wired to `BenillaPaperDollSlot_*` / `BenillaBagBarSlot_*` and do not
inherit these — so a file of their own, loaded after both, costs nothing and makes the chain
readable. This is the reference's published surface for ADDONS, kept where its dependencies are
satisfied.
**The handlers are the reference's own, not transcriptions.** `PaperDollItemSlotButton_OnLoad`,
`_OnEvent`, `_OnClick`, `_Update`, `_UpdateLock`, `_OnEnter` and `_OnUpdate` come from
`PaperDollFrame.lua`, which `ui_script::reference_ui` now SOURCES off the player's own patch
chain. That file earned its place because every one of those acts on `this` and `this:GetID()`
through live APIs and never on a named reference window — see the note beside SOURCED for what
was checked first, including the 18 collisions that order settles in our favour.
`MainMenuBarBagButtons.lua` is deliberately NOT sourced, which is why `BagSlotButton_OnClick`,
`_OnDrag`, `_OnShiftClick` and `_OnEnter` are ours in BagFrame.xml: all four of its versions walk
`ContainerFrame1..NUM_CONTAINER_FRAMES`, windows this client does not build, and two of them
call verbs (`PutItemInBag`, `PickupBagFromSlot`) it does not bind. Sourcing it would have handed
every caller a body that raises inside the addon's own click wrapper.
**pfUI is the measured caller**, and it fits the reference's contract exactly rather than by
luck: it names its bag-bar buttons `pfUIBagsBBag0Slot`.. with a NINE-character prefix, so the
reference's own `strsub(name, 10)` in `PaperDollItemSlotButton_OnLoad` yields `Bag0Slot` and
`GetInventorySlotInfo` answers slot 20. It then reads `$parentIconTexture`, `$parentNormalTexture`,
`GetHighlightTexture()` and `GetPushedTexture()` off what it built, and CHAINS the template's
OnEnter/OnLeave rather than replacing them (modules/bags.lua l.513-585).
OUT, named rather than stubbed (1134 §4): the bank arm. `BankItemButtonBagTemplate` and
`BankItemButtonGenericTemplate` inherit `BankItemButtonTemplate`, whose handlers live in
`BankFrame.lua` — not sourced — and whose OnEnter calls `this:GetInventorySlot()`, a widget
method we do not bind. pfUI reaches those only for its bank window.
-->
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<!-- Ref PaperDollFrame.xml l.4-38, structure and scripts verbatim. The `$parentCooldown` Model
is not optional decoration: the sourced `PaperDollItemSlotButton_Update` resolves it by
name (`getglobal(this:GetName().."Cooldown")`) and calls `:Hide()` / CooldownFrame_SetTimer
on it every repaint, so a button without one raises on its first update. -->
<Button name="PaperDollItemSlotButtonTemplate" inherits="ItemButtonTemplate" virtual="true">
<Frames>
<Model name="$parentCooldown" inherits="CooldownFrameTemplate"/>
</Frames>
<Scripts>
<OnLoad>PaperDollItemSlotButton_OnLoad();</OnLoad>
<OnEvent>PaperDollItemSlotButton_OnEvent(event);</OnEvent>
<OnClick>PaperDollItemSlotButton_OnClick(arg1);</OnClick>
<OnShow></OnShow>
<OnDragStart>PaperDollItemSlotButton_OnClick("LeftButton", 1);</OnDragStart>
<OnReceiveDrag>PaperDollItemSlotButton_OnClick("LeftButton", 1);</OnReceiveDrag>
<OnEnter>PaperDollItemSlotButton_OnEnter();</OnEnter>
<OnLeave>
this.updateTooltip = nil;
GameTooltip:Hide();
ResetCursor();
</OnLeave>
<OnUpdate>PaperDollItemSlotButton_OnUpdate(arg1);</OnUpdate>
</Scripts>
</Button>
<!-- `BagSlotButtonTemplate` was declared here, transcribed from MainMenuBarBagButtons.xml
because that file could not be sourced. It IS sourced now — benilla.toc entry 48, one line
below this file — so the reference's own declaration is the live one and the copy is gone
(decision 1751, window 3). pfUI and anything else that inherits the template now inherits
the reference's, including the `$parentItemAnim` Model our copy structurally could not
carry. -->
</Ui>