From f4951470a3a91626fbe80f2583e1f6593b669d96 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 4 Sep 2026 20:58:15 +0700 Subject: [PATCH] coins ride the cursor, and the trade window and combat text go stock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - coins ride the cursor: `MoneyFrame.lua`/`.xml` load off the player's chain, and the stock kit reads the cursor's coins at load, so the money cursor — payload mode 2, the copper at `[0xb4e2f0]` — is the engine's: `PickupPlayerMoney` puts coins on the cursor and the purse is never debited, and `CoinPickupFrame.xml`, the shift-click coin dialog nothing of ours had ever answered, joins; wow-re's round then set the law: the pickup raises on a non-number and refuses silently on zero, lost control and more than the purse; `AddTradeMoney` folds the coins into the offer as an absolute `CMSG_SET_TRADE_GOLD` gated on the purse; the send-mail setters and `GetCoinIcon` answer as the bytes do; the coinage-change reflex trims an offer the purse no longer covers; and the four send-mail pickup/drop verbs the stock table names do not exist in 5875, so they are not built (1962, 1965) - the trade window is the reference's own file: `TradeFrame.xml` + `TradeFrame.lua` off the chain, ours deleted; `GameTooltip:SetTradePlayerItem`/`SetTradeTargetItem` (`0x5341e0`/`0x534410`) render the slot's item the way the loot slot's is, and `TRADE_PLAYER_ITEM_CHANGED`/`TRADE_TARGET_ITEM_CHANGED` — which the stock file repaints one slot on, and nothing had fired — fire per changed slot beside `TRADE_UPDATE`; the stock file brings the chain's own `MoneyInputFrame`, a TARGET_TRADE `SmallMoneyFrame`, `ItemButtonTemplate` slots and the enchant slot's own wording — "Item not yet modified" where ours had read "Will Not Be Traded"; the wire's enchant id is not carried into the slot yet, so the tooltip shows the item without its enchant (1966) - the dialogs' verbs, as the bytes define them: nine of the ten stock `StaticPopup.lua` bindings 1960 had left named are built off wow-re's round with their packets, events and UIParent arms — the bare trade pair, `ForceLogout`, the instance-boot timer (whole seconds), the area spirit healer's accept/cancel/time, `AcceptBattlefieldPort` out of a three-slot queue `SMSG_BATTLEFIELD_STATUS` fills, `CancelMeetingStoneRequest`, and the pet trainer's pair as the talent wipe's twin, latch for latch — `SMSG_PET_UNLEARN_CONFIRM` latches and asks, `ConfirmPetUnlearn` sends behind the money gate, `CheckPetUntrainerDist` reads the leash; not built, named: the healer's proximity scan (`0x4923b0`: 20 yd to acquire, 22 to retain), so no healer is cached yet, and `ReplaceTradeEnchant`, which rides trade-slot enchant targeting this engine does not build (1963) - the scrolling combat text is the reference's own `Blizzard_CombatText`, LoadOnDemand off the chain: our transcription is deleted, and the addon loads through `UIParentLoadAddOn` at the reference's own sites; the family's fourteen defaults move to the options file where the reference keeps them, because a LoadOnDemand addon cannot define the options that decide whether it loads (1964); and the Looking-for-Group pair is what the bytes define, correcting 1959's flag: `SetLookingForGroup` takes three (type, entry) pairs and a comment, packs each slot as `(type << 24) & entry` — an AND (`0x4e9713`), so every admissible input stores zero — and sends `CMSG_SET_LOOKING_FOR_GROUP` only when the commit changed something; `GetLookingForGroup` answers three nilable slot names then the comment, never 1|nil; and the stock 1.12.1 UI never calls either — both call sites sit in an XML comment (1961) Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/CombatText.xml | 723 ------------------ crates/benilla-app/assets/ui/MoneyFrame.xml | 659 ---------------- crates/benilla-app/assets/ui/OptionsFrame.xml | 77 +- crates/benilla-app/assets/ui/TradeFrame.xml | 512 ------------- crates/benilla-app/assets/ui/UIParent.xml | 30 + crates/benilla-app/assets/ui/benilla.toc | 46 +- crates/benilla-app/src/cursor.rs | 4 + crates/benilla-app/src/lib.rs | 5 + crates/benilla-app/src/net.rs | 26 + crates/benilla-app/src/net/apply.rs | 49 +- crates/benilla-app/src/net/io.rs | 12 + crates/benilla-app/src/sound/ui.rs | 15 +- crates/benilla-app/src/ui_chat/tests.rs | 3 +- crates/benilla-app/src/ui_dialog_verbs.rs | 443 +++++++++++ crates/benilla-app/src/ui_items/drain.rs | 3 +- crates/benilla-app/src/ui_logout.rs | 8 + crates/benilla-app/src/ui_loot.rs | 18 +- .../src/ui_script/action_bar_tests.rs | 20 +- .../benilla-app/src/ui_script/binder_tests.rs | 3 +- .../benilla-app/src/ui_script/buff_tests.rs | 6 +- .../benilla-app/src/ui_script/cast_tests.rs | 3 +- .../src/ui_script/character_tests.rs | 3 +- .../src/ui_script/chat_options_tests.rs | 3 +- .../src/ui_script/chat_resize_tests.rs | 3 +- .../benilla-app/src/ui_script/chat_tests.rs | 6 +- .../src/ui_script/cinematic_tests.rs | 3 +- .../src/ui_script/color_picker_tests.rs | 3 +- .../src/ui_script/combat_text_tests.rs | 43 +- .../src/ui_script/combo_frame_tests.rs | 6 +- .../benilla-app/src/ui_script/death_tests.rs | 3 +- .../src/ui_script/delete_item_tests.rs | 3 +- .../src/ui_script/dressup_tests.rs | 5 +- .../src/ui_script/dropdown_tests.rs | 3 +- .../benilla-app/src/ui_script/duel_tests.rs | 3 +- .../src/ui_script/durability_tests.rs | 6 +- .../src/ui_script/enchant_confirm_tests.rs | 3 +- .../benilla-app/src/ui_script/errors_tests.rs | 3 +- .../benilla-app/src/ui_script/escape_tests.rs | 11 +- .../src/ui_script/exp_bar_tests.rs | 3 +- .../benilla-app/src/ui_script/extract/mod.rs | 3 + .../benilla-app/src/ui_script/fade_tests.rs | 9 +- .../src/ui_script/frame_flag_gate.rs | 7 - .../src/ui_script/game_menu_tests.rs | 7 +- .../src/ui_script/group_loot_tests.rs | 9 +- .../src/ui_script/help_frame_tests.rs | 6 +- .../src/ui_script/honor_frame_tests.rs | 3 +- .../src/ui_script/inspect_tests.rs | 6 +- .../src/ui_script/instance_tests.rs | 3 +- .../src/ui_script/keybindings_tests.rs | 3 +- .../benilla-app/src/ui_script/loot_tests.rs | 3 - .../benilla-app/src/ui_script/macro_tests.rs | 3 +- .../src/ui_script/merchant_tests.rs | 9 +- .../src/ui_script/micro_menu_tests.rs | 5 +- .../src/ui_script/minimap_tests.rs | 15 +- .../src/ui_script/mirror_timer_tests.rs | 3 +- .../src/ui_script/money_frame_tests.rs | 9 +- .../src/ui_script/multibar_stance_tests.rs | 45 +- .../src/ui_script/options_tests.rs | 49 +- .../src/ui_script/panel_template_tests.rs | 3 +- .../benilla-app/src/ui_script/panel_tests.rs | 51 +- .../src/ui_script/perf_bar_tests.rs | 5 +- .../src/ui_script/pet_bar_tests.rs | 3 +- .../src/ui_script/pet_frame_tests.rs | 3 +- .../src/ui_script/petition_tests.rs | 3 +- .../src/ui_script/quest_share_tests.rs | 3 +- .../benilla-app/src/ui_script/quest_tests.rs | 30 +- .../src/ui_script/quest_timer_tests.rs | 3 +- .../src/ui_script/questlog_tests.rs | 57 +- .../benilla-app/src/ui_script/reference_ui.rs | 82 +- .../src/ui_script/screenshot_tests.rs | 3 +- .../src/ui_script/spellbook_tests.rs | 9 +- .../src/ui_script/static_popup_tests.rs | 56 +- .../benilla-app/src/ui_script/summon_tests.rs | 3 +- .../src/ui_script/talent_wipe_tests.rs | 3 +- .../src/ui_script/target_aura_tests.rs | 3 +- .../benilla-app/src/ui_script/taxi_tests.rs | 3 +- crates/benilla-app/src/ui_script/test_ui.rs | 28 +- .../src/ui_script/tooltip_anchor_tests.rs | 11 +- .../src/ui_script/tooltip_template_tests.rs | 3 +- .../src/ui_script/tot_frame_tests.rs | 3 +- .../src/ui_script/trainer_tests.rs | 3 +- .../src/ui_script/unit_frame_tests.rs | 7 +- .../src/ui_script/unit_popup_tests.rs | 6 +- .../src/ui_script/world_map_tests.rs | 3 +- .../src/ui_script/world_state_tests.rs | 3 +- .../src/ui_script/zone_text_tests.rs | 3 +- crates/benilla-app/src/ui_session.rs | 2 + crates/benilla-app/src/ui_social/feed.rs | 5 + crates/benilla-app/src/ui_trade.rs | 99 ++- crates/benilla-app/tests/auction_frame.rs | 3 +- crates/benilla-app/tests/character_stats.rs | 3 +- .../tests/create_frame_template.rs | 3 +- crates/benilla-app/tests/item_text_frame.rs | 3 +- crates/benilla-app/tests/mail_frame.rs | 3 +- crates/benilla-app/tests/talent_frame.rs | 3 +- crates/benilla-app/tests/trade_frame.rs | 50 +- crates/benilla-app/tests/tradeskill_frame.rs | 3 +- crates/benilla-protocol/src/events.rs | 18 + crates/benilla-protocol/src/events/decode.rs | 13 + .../src/messages/battlefield.rs | 102 +++ crates/benilla-protocol/src/messages/death.rs | 25 + .../benilla-protocol/src/messages/instance.rs | 18 + .../src/messages/meeting_stone.rs | 27 + crates/benilla-protocol/src/messages/mod.rs | 28 +- .../benilla-protocol/src/messages/opcode.rs | 44 ++ .../benilla-protocol/src/messages/packet.rs | 30 + crates/benilla-protocol/src/messages/parse.rs | 43 +- crates/benilla-protocol/src/messages/pet.rs | 24 + .../benilla-protocol/src/messages/social.rs | 26 + .../src/world/writer/battlefield.rs | 18 + .../src/world/writer/death.rs | 19 + .../src/world/writer/lifecycle.rs | 7 + .../src/world/writer/meeting_stone.rs | 18 + .../benilla-protocol/src/world/writer/mod.rs | 2 + .../benilla-protocol/src/world/writer/pet.rs | 6 + .../src/world/writer/social.rs | 9 + crates/benilla-ui/src/script/container.rs | 4 +- crates/benilla-ui/src/script/cursor.rs | 22 + crates/benilla-ui/src/script/cursor/bar.rs | 3 + crates/benilla-ui/src/script/cursor/doll.rs | 4 +- crates/benilla-ui/src/script/cursor/money.rs | 361 +++++++++ crates/benilla-ui/src/script/dialog_verbs.rs | 280 +++++++ crates/benilla-ui/src/script/mail.rs | 97 ++- crates/benilla-ui/src/script/mod.rs | 7 +- crates/benilla-ui/src/script/model.rs | 47 +- crates/benilla-ui/src/script/session.rs | 6 + crates/benilla-ui/src/script/social.rs | 162 +++- .../benilla-ui/src/script/tooltip_item/mod.rs | 52 ++ crates/benilla-ui/src/script/trade.rs | 77 +- 129 files changed, 2792 insertions(+), 2352 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/CombatText.xml delete mode 100644 crates/benilla-app/assets/ui/MoneyFrame.xml delete mode 100644 crates/benilla-app/assets/ui/TradeFrame.xml create mode 100644 crates/benilla-app/src/ui_dialog_verbs.rs create mode 100644 crates/benilla-protocol/src/messages/battlefield.rs create mode 100644 crates/benilla-protocol/src/messages/meeting_stone.rs create mode 100644 crates/benilla-protocol/src/world/writer/battlefield.rs create mode 100644 crates/benilla-protocol/src/world/writer/meeting_stone.rs create mode 100644 crates/benilla-ui/src/script/cursor/money.rs create mode 100644 crates/benilla-ui/src/script/dialog_verbs.rs diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml deleted file mode 100644 index 76ab35d8..00000000 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ /dev/null @@ -1,723 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CombatText_OnLoad() - CombatText_OnEvent(event) - CombatText_OnUpdate(arg1) - - - diff --git a/crates/benilla-app/assets/ui/MoneyFrame.xml b/crates/benilla-app/assets/ui/MoneyFrame.xml deleted file mode 100644 index 355dc1e7..00000000 --- a/crates/benilla-app/assets/ui/MoneyFrame.xml +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - - - - - - - - MoneyFrame_OnLoad() - MoneyFrame_OnEvent() - MoneyFrame_UpdateMoney() - BenillaMoneyFrame_OnHide() - - - - - - - - - - - - - SmallMoneyFrame_OnLoad() - MoneyFrame_OnEvent() - MoneyFrame_UpdateMoney() - BenillaMoneyFrame_OnHide() - - - diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 532d863f..a7d03169 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -220,6 +220,50 @@ RegisterForSave("QUEST_FADING_DISABLE") AUTO_QUEST_WATCH = "1" RegisterForSave("AUTO_QUEST_WATCH") + -- Combat text uvars (ref UIOptionsFrame.lua l.135-152, verbatim). They lived in our + -- CombatText.xml while that file stood in for the addon; the addon is the reference's + -- own `Blizzard_CombatText` off the chain now, LoadOnDemand as the reference ships it, + -- so its option family's defaults sit where the reference keeps them (1964). + SHOW_COMBAT_TEXT = "0" + RegisterForSave("SHOW_COMBAT_TEXT") + COMBAT_TEXT_SHOW_LOW_HEALTH_MANA = "1" + RegisterForSave("COMBAT_TEXT_SHOW_LOW_HEALTH_MANA") + COMBAT_TEXT_SHOW_AURAS = "1" + RegisterForSave("COMBAT_TEXT_SHOW_AURAS") + COMBAT_TEXT_SHOW_AURA_FADE = "0" + RegisterForSave("COMBAT_TEXT_SHOW_AURA_FADE") + COMBAT_TEXT_SHOW_COMBAT_STATE = "1" + RegisterForSave("COMBAT_TEXT_SHOW_COMBAT_STATE") + COMBAT_TEXT_SHOW_DODGE_PARRY_MISS = "0" + RegisterForSave("COMBAT_TEXT_SHOW_DODGE_PARRY_MISS") + COMBAT_TEXT_SHOW_RESISTANCES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_RESISTANCES") + COMBAT_TEXT_SHOW_REPUTATION = "0" + RegisterForSave("COMBAT_TEXT_SHOW_REPUTATION") + COMBAT_TEXT_SHOW_REACTIVES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_REACTIVES") + COMBAT_TEXT_SHOW_FRIENDLY_NAMES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_FRIENDLY_NAMES") + COMBAT_TEXT_SHOW_COMBO_POINTS = "0" + RegisterForSave("COMBAT_TEXT_SHOW_COMBO_POINTS") + COMBAT_TEXT_SHOW_MANA = "0" + RegisterForSave("COMBAT_TEXT_SHOW_MANA") + COMBAT_TEXT_FLOAT_MODE = "1" + RegisterForSave("COMBAT_TEXT_FLOAT_MODE") + COMBAT_TEXT_SHOW_HONOR_GAINED = "1" + RegisterForSave("COMBAT_TEXT_SHOW_HONOR_GAINED") + + -- The family's apply, ref UIOptionsFrame_Save l.371-376 verbatim: the addon is + -- LoadOnDemand, so turning the master on loads it, and the update runs only once it is + -- there. Every combat-text row's `applyFunc` is this (1964). + function CombatText_UpdateOrLoad() + if ( SHOW_COMBAT_TEXT == "1" ) then + UIParentLoadAddOn("Blizzard_CombatText") + end + if ( CombatText_UpdateDisplayedMessages ) then + CombatText_UpdateDisplayedMessages() + end + end -- CHAT_LOCKED / REMOVE_CHAT_DELAY — the chat window's two uvars, the reference's own -- UIOptionsFrame.lua l.96-99 defaults ("0" and "0"), read every frame by -- FloatingChatFrame.lua's FCF_Get_ChatLocked and FCF_OnUpdate since the chat window went @@ -1073,6 +1117,11 @@ end function OptionsFrame_ApplySavedSettings() + -- ref UIOptionsFrame_OnEvent's VARIABLES_LOADED arm, l.224-226: the combat text + -- addon loads at login when the saved master is on (1964). + if ( SHOW_COMBAT_TEXT == "1" ) then + UIParentLoadAddOn("Blizzard_CombatText") + end local ran = {} for key, rows in pairs(OPTIONS_PAGE_ROWS) do for _, rkey in ipairs(rows) do @@ -2792,7 +2841,7 @@ OptionsGlobalRow_OnLoad(self, "SHOW_COMBAT_TEXT", "Enable Floating Combat Text", "OPTION_TOOLTIP_SHOW_COMBAT_TEXT") - self.applyFunc = "CombatText_UpdateDisplayedMessages" -- by NAME, resolved when applied: this file loads before its definer now (1938) + self.applyFunc = "CombatText_UpdateOrLoad" -- by NAME, resolved when applied: this file loads before its definer now (1938) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MoneyInputFrame_SetMode(this, "compact") - MoneyInputFrame_SetOnvalueChangedFunc(this, TradeFrame_UpdateMoney) - - - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("TARGET_TRADE"); - - - - TradeFrame_OnLoad() - TradeFrame_OnEvent() - TradeFrame_OnShow(); PlaySound("igCharacterInfoOpen") - TradeFrame_OnHide(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml index 124f45a5..7038f3b6 100644 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ b/crates/benilla-app/assets/ui/UIParent.xml @@ -75,6 +75,12 @@ this:RegisterEvent("CONFIRM_TALENT_WIPE") this:RegisterEvent("CONFIRM_BINDER") this:RegisterEvent("CONFIRM_SUMMON") + -- The dialog engine's verbs (1963): the feeds behind these exist now. + this:RegisterEvent("INSTANCE_BOOT_START") + this:RegisterEvent("INSTANCE_BOOT_STOP") + this:RegisterEvent("CONFIRM_PET_UNLEARN") + this:RegisterEvent("AREA_SPIRIT_HEALER_IN_RANGE") + this:RegisterEvent("AREA_SPIRIT_HEALER_OUT_OF_RANGE") UIParent_OnEvent(event)