From b8e0025bc96d69e25a2f6eecc674bbbedfd3272b Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 2 Sep 2026 17:05:15 +0700 Subject: [PATCH] the flight map goes stock, and vendors refuse in 1.12's own words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the pet stable and the flight map are the reference's own files: `TaxiRouteFrame` maps to a plain Frame (factory `0x495ba0` allocates the base size, the ctor adds no field, no new virtual, no method table — and `GetObjectType` is not overridden, so its own kind would have been the divergence), and the swap found three silent behaviours — the close button did nothing (an unknown `inherits=` is a WARNING, so it loaded as a bare button), the "no paths" line drew empty, and the title is READ off `UnitName("npc")`, not received; the WMO skybox rides the interior crossfade — one weight (`[0xce9bdc]`, the same number the MFOG lerp rides), a 4 s alpha fade, so a skybox the flood publishes through a doorway draws at weight 0 instead of popping in whole - a widget predicate answers the NUMBER 1 or nil, never a boolean: eleven of them (`IsShown`, `IsVisible`, `IsMovable`, `GetChecked`…) move to the 1.12 shape — the reference proves it in its own source (`tostring(this:GetChecked())` saved and read back `== "1"`; `tostring(true)` would never match and buff timers would never appear), 21 corpus sites compare directly (`IsVisible() == nil`, `GetChecked() == 1`), and one of our own tests had the guild rank editor sending `true` where a real client sends 1 - the vendor's refusals are the reference's table: `SMSG_BUY_FAILED`/`SMSG_SELL_ITEM` route through `0x5dcd60`/`0x5dd1f0`'s switches, six lines were wrong (code 3 printed "That vendor can't be found." — vmangos's identifier — where 1.12 prints "That merchant doesn't like you."), silence is now expressible, and keying them gives the vendor a voice (`ERR_NOT_ENOUGH_MONEY` carries error-speech line 0x28); the bank's three ids were right and its "purchase failed (n)" an invention; the logout refusal is one key, `ERR_LOGOUT_FAILED`, for every non-zero reason; the two mail codes we said had no string have one (`ERR_PLAYER_WRONG_FACTION`, `ERR_RESTRICTED_ACCOUNT`) and a sent mail says `ERR_MAIL_SENT` in yellow; a test runs the chain's own `GlobalStrings.lua` and requires non-empty text for all 193 `ERR_*` the workspace names - a clicked quest timer no longer raises — stock `QuestTimerFrame.lua` calls `QuestLog_SetSelection`/`QuestLog_Update`, which existed nowhere in this tree; our quest log owns the reference's two names now, which also shrinks the delta when that window itself migrates Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/PetStable.xml | 715 ------------------ .../benilla-app/assets/ui/QuestLogFrame.xml | 38 + crates/benilla-app/assets/ui/TaxiFrame.xml | 557 -------------- crates/benilla-app/assets/ui/benilla.toc | 26 +- crates/benilla-app/src/debug_panel/world.rs | 11 +- crates/benilla-app/src/net/apply.rs | 8 +- crates/benilla-app/src/net/apply/npc.rs | 30 +- crates/benilla-app/src/ui_action/errors.rs | 11 + crates/benilla-app/src/ui_action/mod.rs | 4 +- crates/benilla-app/src/ui_bank.rs | 47 +- crates/benilla-app/src/ui_logout.rs | 67 +- crates/benilla-app/src/ui_mail/mod.rs | 136 ++-- crates/benilla-app/src/ui_merchant.rs | 200 ++++- .../benilla-app/src/ui_script/chat_tests.rs | 6 +- .../benilla-app/src/ui_script/guild_tests.rs | 4 +- .../benilla-app/src/ui_script/reference_ui.rs | 14 - .../benilla-app/src/ui_script/taxi_tests.rs | 45 +- crates/benilla-app/tests/message_keys.rs | 59 ++ crates/benilla-assets/src/materials.rs | 8 +- crates/benilla-ui/src/loader/tests.rs | 2 +- crates/benilla-ui/src/messages.rs | 8 +- crates/benilla-ui/src/script/binding_abi.rs | 30 + crates/benilla-ui/src/script/button.rs | 12 +- crates/benilla-ui/src/script/object.rs | 18 + .../src/script/object/frame_state.rs | 32 +- .../benilla-ui/src/script/object/movable.rs | 16 +- .../benilla-ui/src/script/object/toplevel.rs | 4 +- crates/benilla-ui/src/script/tests/button.rs | 3 +- crates/benilla-ui/src/script/tests/input.rs | 4 +- crates/benilla-world/src/clouds/layer.rs | 18 +- crates/benilla-world/src/lighting/mod.rs | 11 +- crates/benilla-world/src/lighting/resolve.rs | 43 +- crates/benilla-world/src/model_render.rs | 2 +- .../benilla-world/src/model_render/batch.rs | 100 ++- crates/benilla-world/src/sky.rs | 17 +- crates/benilla-world/src/skybox.rs | 151 +++- crates/benilla-world/src/sun/mod.rs | 8 +- crates/benilla-world/src/wmo_portal/fog.rs | 4 +- 38 files changed, 905 insertions(+), 1564 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/PetStable.xml delete mode 100644 crates/benilla-app/assets/ui/TaxiFrame.xml diff --git a/crates/benilla-app/assets/ui/PetStable.xml b/crates/benilla-app/assets/ui/PetStable.xml deleted file mode 100644 index 6c492640..00000000 --- a/crates/benilla-app/assets/ui/PetStable.xml +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - this:RegisterForDrag("LeftButton") - - -- xml l.31-38. Guarded on `this.tooltip` because Update has not necessarily run - -- yet: a hover before the first repaint has nothing to say and says nothing. - if this.tooltip then - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(this.tooltip) - GameTooltip:AddLine(this.tooltipSubtext, "", 1.0, 1.0, 1.0) - GameTooltip:Show() - end - - GameTooltip:Hide() - - if ClickStablePet(this:GetID()) then - PetStable_Update() - end - - PickupStablePet(this:GetID()) - - if ClickStablePet(this:GetID()) then - PetStable_Update() - end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(this.tooltip) - - GameTooltip:Hide() - - - - - - Model_OnLoad() - Model_OnUpdate(arg1, this) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SmallMoneyFrame_OnLoad() MoneyFrame_SetType("STATIC") - - - - - - - - PetStable_OnLoad() - PlaySound("igCharacterInfoOpen") - ClosePetStables() PlaySound("igCharacterInfoClose") - PetStable_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/QuestLogFrame.xml b/crates/benilla-app/assets/ui/QuestLogFrame.xml index 1c44086e..6e6aaa93 100644 --- a/crates/benilla-app/assets/ui/QuestLogFrame.xml +++ b/crates/benilla-app/assets/ui/QuestLogFrame.xml @@ -1071,6 +1071,44 @@ -- `doNotScroll` (pin §5's asymmetry, threaded through to `BenillaQuestLogDetail_Update`): -- absent/falsy for a manual call (a row click, the window's own OnShow); `true` from the -- QUEST_LOG_UPDATE event handler below. + -- ── The reference's own two names for what this window already does ───────────────── + -- + -- `QuestTimerFrame.xml` is the reference's own file, on the chain since 1751, and its + -- `QuestTimerButton_OnClick` (QuestTimerFrame.lua:41-45) does exactly three things: + -- ShowUIPanel, `QuestLog_SetSelection(...)`, `QuestLog_Update()`. Neither of the last two + -- existed anywhere in this tree, so clicking a quest timer raised. Defining them here is + -- not a stub of an engine verb (1203) — both are FrameXML functions, and this file is our + -- stand-in for `QuestLogFrame.lua`, which is where the reference defines them. Every other + -- function in this window has the same relationship to its stock twin; these two were + -- simply missed because nothing of ours called them. + -- + -- `QuestLog_SetSelection`'s stock body (QuestLogFrame.lua:317-345) is mostly frame work + -- that only the stock window has — `QuestLogTitle`..id, `QuestLogHighlightFrame`, + -- `QuestLogSkillHighlight`. What survives the re-expression is its LAW: a header never + -- becomes the selection (it folds instead), and a real quest is selected and repainted. + -- That is the same fork `BenillaQuestLogTitle_OnClick` above already implements, so this + -- is the shared body rather than a second copy of it. + function QuestLog_SetSelection(index) + if not index or index == 0 then return end + local _, _, _, isHeader, isCollapsed = GetQuestLogTitle(index) + if isHeader then + if isCollapsed and type(ExpandQuestHeader) == "function" then + ExpandQuestHeader(index) + elseif type(CollapseQuestHeader) == "function" then + CollapseQuestHeader(index) + end + return + end + SelectQuestLogEntry(index) + end + + -- The reference's `QuestLog_Update` (QuestLogFrame.lua:107). Ours has carried this body + -- under a `Benilla` prefix; the stock name is the one the chain calls, and having it here + -- also shrinks the delta when this window itself migrates. + function QuestLog_Update(doNotScroll) + BenillaQuestLogFrame_Update(doNotScroll) + end + function BenillaQuestLogFrame_Update(doNotScroll) QuestLog_SetFirstValidSelection() BenillaQuestLogList_Update() diff --git a/crates/benilla-app/assets/ui/TaxiFrame.xml b/crates/benilla-app/assets/ui/TaxiFrame.xml deleted file mode 100644 index afbebfe3..00000000 --- a/crates/benilla-app/assets/ui/TaxiFrame.xml +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -