From 7e3a67a02efd3b6aabfdc4832a0b5e2f7f0c366e Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 2 Sep 2026 17:04:32 +0700 Subject: [PATCH] the unit frames are the reference's own, and the water has motes in it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the player, party, target and pet frames are the reference's own files (`BuffFrame`, `UnitFrame`, `CombatFeedback`, `PlayerFrame`, `PartyFrame`, `TargetFrame`, `PetFrame`, in the reference's toc order) — our 2741-line `UnitFrames.xml` and our `PartyFrame.xml` are deleted; four engine verbs built for them (`PartialPlayTime`, `NoPlayTime`, `UnitPlayerControlled`, `UnitIsCivilian`, each answering 1/nil), the whole-UI load bracketed in the counted sound-suppression scope `0x48fbf0` self-brackets (the reference fires a `PlaySound` during load and throws it away), and `GetBillingTimeRested` read off `SMSG_AUTH_RESPONSE`'s third billing field rather than hardcoded; the differences the stock files bring are pinned rather than papered — `PlayerFrame` never hides, an unresolved name is BLANK not "Unknown", the target frame has no numerals at all (a bar hover pops the unit tooltip instead) - what the swap surfaced, each a hard break under the stock files: `UnitBuff`/`UnitDebuff` returned the Classic Era ten-value tuple, name first, where 1.12 returns two and three values TEXTURE first (`0x519500`/`0x5198f0`) — a raise twice per `UNIT_AURA` on any debuffed target, and all 184 corpus call sites bind the 1.12 shape; the power events are named per resource (`UNIT_MANA`/`RAGE`/`FOCUS`/`ENERGY`/`HAPPINESS` and their MAX twins) and we fired the Era pair, so no mana, rage or energy bar could live-update; `SetRaidTarget` is the engine verb and `SetRaidTargetIcon` the FrameXML toggle wrapper — we had registered the wrapper's name on the engine's body, so every raid mark in the unit popup raised - the underwater drift cloud: the reference draws a fixed 4000-mote field whenever the camera eye is inside a liquid — not a particle system, nothing spawns, ages or dies; a population scattered once into a 30 yd camera-relative cube, advected by the camera's own motion plus a gust and wrapped, so the field stands still in the world; benilla had the murk and nothing in it; a dry frame commits no draw, and the submerged one is bounded by the reference's own 666-quad cap (633–644 of 4000 measured live, which is the expected survivor count of a uniform cube through the 90° cone — an independent check on population, distribution and cone at once) Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/ActionBar.xml | 6 +- crates/benilla-app/assets/ui/CombatText.xml | 19 +- crates/benilla-app/assets/ui/OptionsFrame.xml | 13 + crates/benilla-app/assets/ui/PartyFrame.xml | 360 --- crates/benilla-app/assets/ui/UIParent.xml | 7 + crates/benilla-app/assets/ui/UnitFrames.xml | 2741 ----------------- crates/benilla-app/assets/ui/benilla.toc | 94 +- crates/benilla-app/src/addon_harness/mod.rs | 15 +- crates/benilla-app/src/char_select/mod.rs | 8 +- crates/benilla-app/src/net.rs | 7 +- crates/benilla-app/src/net/apply.rs | 2 + crates/benilla-app/src/net/apply/session.rs | 5 +- crates/benilla-app/src/net/io.rs | 2 + .../src/ui_script/character_tests.rs | 1 + .../src/ui_script/combo_frame_tests.rs | 15 +- .../src/ui_script/frame_flag_gate.rs | 19 +- .../src/ui_script/game_menu_tests.rs | 12 +- .../src/ui_script/inspect_tests.rs | 1 + .../src/ui_script/instance_tests.rs | 10 +- crates/benilla-app/src/ui_script/lifecycle.rs | 1 + crates/benilla-app/src/ui_script/manifest.rs | 12 + crates/benilla-app/src/ui_script/mod.rs | 6 +- .../src/ui_script/options_tests.rs | 16 +- .../src/ui_script/pet_frame_tests.rs | 104 +- .../src/ui_script/pet_paperdoll_tests.rs | 1 + .../benilla-app/src/ui_script/quiver_tests.rs | 1 + .../benilla-app/src/ui_script/reference_ui.rs | 33 +- .../src/ui_script/shipped_xml_tests.rs | 46 +- .../src/ui_script/target_aura_tests.rs | 42 +- crates/benilla-app/src/ui_script/test_ui.rs | 38 +- .../src/ui_script/tooltip_anchor_tests.rs | 57 +- .../src/ui_script/tot_frame_tests.rs | 212 +- .../src/ui_script/unit_frame_tests.rs | 366 ++- .../src/ui_script/unit_popup_tests.rs | 64 +- crates/benilla-app/src/ui_unit.rs | 67 +- crates/benilla-protocol/src/events.rs | 10 +- .../benilla-protocol/src/messages/packet.rs | 9 + crates/benilla-protocol/src/messages/parse.rs | 9 +- crates/benilla-protocol/src/world/session.rs | 29 +- crates/benilla-ui/src/script/aura/mod.rs | 158 +- crates/benilla-ui/src/script/mod.rs | 16 +- crates/benilla-ui/src/script/model.rs | 41 + crates/benilla-ui/src/script/party.rs | 15 +- crates/benilla-ui/src/script/sound.rs | 11 +- crates/benilla-ui/src/script/unit/bindings.rs | 84 + crates/benilla-ui/src/script/unit/mod.rs | 57 +- crates/benilla-world/src/liquid/drift.rs | 930 ++++++ crates/benilla-world/src/liquid/mod.rs | 8 + crates/benilla-world/src/particles/emit.rs | 2 +- crates/benilla-world/src/particles/render.rs | 1 + crates/benilla-world/src/sky_order.rs | 21 + 51 files changed, 2337 insertions(+), 3467 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/PartyFrame.xml delete mode 100644 crates/benilla-app/assets/ui/UnitFrames.xml create mode 100644 crates/benilla-world/src/liquid/drift.rs diff --git a/crates/benilla-app/assets/ui/ActionBar.xml b/crates/benilla-app/assets/ui/ActionBar.xml index 55a89b04..5bccfd6a 100644 --- a/crates/benilla-app/assets/ui/ActionBar.xml +++ b/crates/benilla-app/assets/ui/ActionBar.xml @@ -100,9 +100,11 @@ BOTTOMRIGHT_ACTIONBAR_PAGE = 5 BOTTOMLEFT_ACTIONBAR_PAGE = 6 - -- Ref ActionButton.lua:4 / UIParent.lua: the flash blink period and the range-check cadence. + -- Ref ActionButton.lua:4: the flash blink period. Its neighbour `TOOLTIP_UPDATE_TIME` + -- (the range-check cadence this file's `rangeTimer` reads) moved to UIParent.xml, which is + -- the reference's own home for it — `UIParent.lua:1`, and the stock `BuffFrame.lua` reads + -- it as well. ATTACK_BUTTON_FLASH_TIME = 0.4 - TOOLTIP_UPDATE_TIME = 0.2 -- "Lock ActionBars" (ref UIOptionsFrame.lua:102-103 — uvar LOCK_ACTIONBAR, default "0"). -- The reference declares it in its options window; ours lives with the bar it locks, which diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml index d635b0a0..76ab35d8 100644 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ b/crates/benilla-app/assets/ui/CombatText.xml @@ -19,8 +19,10 @@ strings; region templates are outside the v1 loader's object model (BuffFrame.xml has the precedent note), so the 20 instances inherit the CombatTextFont Font object and carry the template's anchor directly. - - UNIT_MANA → UNIT_POWER_UPDATE + the Era Unit* API (our event surface, decision 0068); - same low-mana law. PLAYER_COMBO_POINTS rides the combo wire (0869); its arm reads + - UNIT_MANA, the spec's own event. This used to read UNIT_POWER_UPDATE + the Era Unit* API + (0068's surface); 1819 retired that pair — 1.12 names the resource in the event, and the + Era spelling was a deviation this file's own header already flagged. Same low-mana law, + and now the handler is not woken by rage or energy at all. PLAYER_COMBO_POINTS rides the combo wire (0869); its arm reads `GetComboPoints()`, so it is rogue/druid-only and per-target for free — the binding gates, not this file (0875). - Lua 5.0 `for k,v in t` iteration becomes explicit index loops (5.1 VM), backwards @@ -284,10 +286,11 @@ if not messageType then return end - elseif event == "UNIT_POWER_UPDATE" then - -- Spec: UNIT_MANA + UnitMana/UnitManaMax (header deviation — the Era surface). - -- Power type 0 is mana; the same event also carries rage, focus and energy, none - -- of which has a low warning. + elseif event == "UNIT_MANA" then + -- The powerType == 0 guard still earns its place: `power_token` reports an UNKNOWN + -- power type as MANA (its descriptor default), so this event can arrive for a unit + -- whose track is not really mana. Rage, focus and energy now have their own event + -- names and never reach here at all (1819). local mana = UnitMana("player") local powerType = UnitPowerType("player") if arg1 == "player" then @@ -567,7 +570,7 @@ if SHOW_COMBAT_TEXT == "0" then CombatText:UnregisterEvent("COMBAT_TEXT_UPDATE") CombatText:UnregisterEvent("UNIT_HEALTH") - CombatText:UnregisterEvent("UNIT_POWER_UPDATE") + CombatText:UnregisterEvent("UNIT_MANA") CombatText:UnregisterEvent("PLAYER_COMBO_POINTS") CombatText:UnregisterEvent("PLAYER_REGEN_DISABLED") CombatText:UnregisterEvent("PLAYER_REGEN_ENABLED") @@ -575,7 +578,7 @@ else CombatText:RegisterEvent("COMBAT_TEXT_UPDATE") CombatText:RegisterEvent("UNIT_HEALTH") - CombatText:RegisterEvent("UNIT_POWER_UPDATE") + CombatText:RegisterEvent("UNIT_MANA") CombatText:RegisterEvent("PLAYER_COMBO_POINTS") CombatText:RegisterEvent("PLAYER_REGEN_DISABLED") CombatText:RegisterEvent("PLAYER_REGEN_ENABLED") diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 8d43abb7..48e4a6d9 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -210,6 +210,19 @@ SHOW_BUFF_DURATIONS = "0" RegisterForSave("SHOW_BUFF_DURATIONS") + -- The target-of-target pair, at the reference's own values and in the reference's own home + -- (`UIOptionsFrame.lua` l.116-119, where both sit in the uvar defaults block and both are + -- RegisterForSave'd). The switch ships OFF and the state ships "5". + -- + -- These lived in our `UnitFrames.xml` file scope until the unit-frame kit went to the + -- chain — a squatter, and its own note said so. The reference declares them beside the + -- other party/unit uvars here, and `TargetFrame.lua:504` reads the switch at CALL time + -- (`TargetofTarget_Update`), so this file sitting far below the frames does not bind. + SHOW_TARGET_OF_TARGET = "0" + SHOW_TARGET_OF_TARGET_STATE = "5" + RegisterForSave("SHOW_TARGET_OF_TARGET") + RegisterForSave("SHOW_TARGET_OF_TARGET_STATE") + -- The static category tree (era Game tab, Classic tocs), in list order. Keys are the row -- name suffixes; the visible label doubles as the page title (the era does the same — -- Settings.RegisterCategory names both from one string). diff --git a/crates/benilla-app/assets/ui/PartyFrame.xml b/crates/benilla-app/assets/ui/PartyFrame.xml deleted file mode 100644 index 56966fe2..00000000 --- a/crates/benilla-app/assets/ui/PartyFrame.xml +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PartyFrameDropDown_OnLoad() - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaPartyFrame_OnLoad(this) - BenillaPartyFrame_OnEvent(this) - BenillaPartyFrame_OnUpdate(this, arg1) - BenillaPartyFrame_OnEnter(this) - GameTooltip:FadeOut() - BenillaPartyFrame_OnClick(this, arg1) - - - - - - - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml index b3f8a287..2f275c91 100644 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ b/crates/benilla-app/assets/ui/UIParent.xml @@ -126,6 +126,13 @@ -- the custom block at the end of the pass recomputes it, for the reason recorded there. PETACTIONBAR_XPOS = 36 + -- ref UIParent.lua:1 — the tooltip/range re-check cadence. It lived in our ActionBar.xml, + -- beside the range timer that reads it; the reference's own `BuffFrame.lua:32` reads it too + -- and, now that BuffFrame is the reference's own file (1751), a kit can want the buff row + -- without wanting the action bars. So it moves to the reference's home, one line above the + -- constant below it. + TOOLTIP_UPDATE_TIME = 0.2 + -- ref UIParent.lua:2 — the model panes' held-button spin rate (half a turn per second), -- read by every `Model_OnUpdate` transcription (the character window's + inspect's). ROTATIONS_PER_SECOND = .5 diff --git a/crates/benilla-app/assets/ui/UnitFrames.xml b/crates/benilla-app/assets/ui/UnitFrames.xml deleted file mode 100644 index d0e54321..00000000 --- a/crates/benilla-app/assets/ui/UnitFrames.xml +++ /dev/null @@ -1,2741 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PlayerFrameDropDown_OnLoad() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TargetFrameDropDown_OnLoad() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TargetofTargetHealthCheck() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PetFrameDropDown_OnLoad() - - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - if TextStatusBar_Initialize then TextStatusBar_Initialize() end - if TextStatusBar_OnEvent then TextStatusBar_OnEvent(arg1, arg2) end - if TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() end - BenillaUnitFrameBar_OnEnter(self) - BenillaUnitFrameBar_OnLeave(self) - BenillaUnitFrameBar_OnMouseUp(self, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaPetHappiness_OnEnter(this) - - - GameTooltip:Hide() - - - - - - - - - - - PetFrame_OnLoad() - PetFrame_OnEvent(event) - PetFrame_OnUpdate(arg1) - BenillaPetFrame_OnEnter(this) - if SpellIsTargeting() then SetCursor("CAST_ERROR_CURSOR") end GameTooltip:FadeOut() - PetFrame_OnClick(arg1) - - - diff --git a/crates/benilla-app/assets/ui/benilla.toc b/crates/benilla-app/assets/ui/benilla.toc index ec8df4ee..fb27419c 100644 --- a/crates/benilla-app/assets/ui/benilla.toc +++ b/crates/benilla-app/assets/ui/benilla.toc @@ -216,75 +216,65 @@ Interface\FrameXML\ItemRef.xml # and the numerals simply never appear. The `.lua` comes first, as it does there. Interface\FrameXML\TextStatusBar.lua Interface\FrameXML\TextStatusBar.xml +# ══ THE PLAYER AURA BAR — the reference's own, off the player's chain (1751) ══ +# The HUD row of buff/debuff icons under the minimap, driven by the UnitAura feed +# (`crate::ui_aura`; decisions 0255/0257). +# +# FIRST OF THE KIT, which is the reference's own order (its toc: BuffFrame 40, CombatFeedback 41, +# UnitFrame 43, PlayerFrame 44, PartyFrame 45, TargetFrame 46, PetFrame 47). It has to precede +# PartyFrame because stock `PartyMemberFrame.lua:60` calls `RefreshBuffs` from each row's OnLoad +# and `BuffFrame.lua` is where that lives. Ours had BuffFrame below the unit frames; that +# inversion is gone. +Interface\FrameXML\BuffFrame.xml # ══ THE UNIT-FRAME KIT — the reference's own, off the player's chain (1751, window 22) ══ # `UnitFrame.xml` declares NO frames — it is a `