Files
benilla-octo/crates/benilla-app/assets/ui/TalentWipeConfirm.xml
T
SamandClaude Fable 5 ab235bad6e the target-of-target frame, and talents can be unlearned again
- the target-of-target frame and its option: 1.12's frame with its five display modes, fed one hop off the selected unit's own target field through the same read `/assist` runs, in four feeds (snapshot and transitions, the debuff buttons, the portrait booth, TargetUnit's click arm); ships off, as 1.12 does, on its own pair of saved globals
- talents can be unlearned again: the trainer's `MSG_TALENT_WIPE_CONFIRM` had no handler since the wipe flow was deferred, so the gossip line closed the menu and did nothing — the question is an NPC session (walking away retracts it), the popup shows the cost on the StaticPopup money variant, Accept answers it behind the client's own purse check
- Sprint's sparkles hang in the air behind you along the trail instead of collapsing into your torso: ride-vs-trail is the emitter's own file flag 0x10, not the host class — the finding wow-re returned eighteen days ago and nobody folded; the particle dump names the two flag bits it had been mis-reporting
- `/sleep` takes both movement masks (the strictest posture), correcting the day's sit gate which let you lie down on a lake bottom while `/sit` was refused; a Lua-driven selection (TargetUnit on an attackable token) starts the swing exactly as a click does, through the one select path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 18:40:16 +07:00

83 lines
4.4 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/">
<!--
The class trainer's "unlearn all of your talents?" dialog (decision 1580): a registry entry
on the shared StaticPopup engine (UiPanels.xml) plus its UIParent event arm, written against
the patch-chain FrameXML (mpqx extraction, decision 0246) — StaticPopup.lua l.1289-1304 (the
entry) and UIParent.lua l.123 / l.533-538 (the registration and the show arm). The string is
GlobalStrings.lua l.853, verbatim.
It is BinderConfirm.xml's twin, one line above it in the TOC, and free-standing for the
identical reason: selecting the trainer's "I wish to unlearn my talents" line makes the
server CLOSE the gossip menu and then ask, so the window that raised this dialog is already
gone by the time it appears.
The whole flow behind it is one two-way opcode — MSG_TALENT_WIPE_CONFIRM in with the
trainer's guid and the cost, the same opcode back out with that guid — and only the second
one unlearns anything (`crate::ui_talent_wipe`'s header carries the law). Accepting is
therefore the ONLY path to a reset spec; there is nothing to undo on Cancel, which is why
this entry has no OnCancel.
It is also the first entry in the registry to raise a MONEY frame, because the cost is the
interesting half of the question and the sentence below deliberately does not name it — the
engine shows the coin row for `hasMoneyFrame`, and the arm at the bottom fills it.
-->
<Script><![CDATA[
-- ── Strings (GlobalStrings.lua, verbatim) ───────────────────────────────────────────────
local CONFIRM_TALENT_WIPE =
"Do you want to unlearn all of your talents? The cost will increase each time you do it." -- l.853
local ACCEPT = "Accept" -- l.10
local CANCEL = "Cancel" -- l.464
-- The dialog's only teardown, and like the innkeeper's it is a poll rather than an event:
-- walk away from the trainer and the question leaves the screen by itself, with no packet
-- either way. `CheckTalentMasterDist()` is the engine binding behind it
-- (`benilla-ui/src/script/talent.rs`), false as soon as the app's NPC-session guard has
-- closed the question. Named rather than inlined, because "the question expires when you
-- walk away" is the interesting half of this file.
local function hideOnceOutOfRange(_, dialog)
if not CheckTalentMasterDist() then
dialog:Hide()
end
end
-- ── The confirm — answering to StaticPopup.lua l.1289-1304 ─────────────────────────────
StaticPopupDialogs["CONFIRM_TALENT_WIPE"] = {
text = CONFIRM_TALENT_WIPE,
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function()
ConfirmTalentWipe()
end,
OnUpdate = hideOnceOutOfRange,
hasMoneyFrame = 1,
timeout = 0,
hideOnEscape = 1,
}
-- ── The UIParent event arm (UIParent.lua l.533-538) ────────────────────────────────────
-- arg1 is the cost in COPPER, and it goes to the money frame rather than into the text:
-- the sentence above is fixed. The nil guard is the reference's own — Show returns nothing
-- when the dialog is refused (dead without whileDead, or no free instance), and there is
-- then no money frame to fill.
function BenillaTalentWipeConfirmDriver_OnEvent()
if event == "CONFIRM_TALENT_WIPE" then
local dialog = StaticPopup_Show("CONFIRM_TALENT_WIPE")
if dialog then
MoneyFrame_Update(dialog:GetName() .. "MoneyFrame", arg1)
end
end
end
]]></Script>
<Frame name="BenillaTalentWipeConfirmDriver" hidden="true">
<Size><AbsDimension x="1" y="1"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<Scripts>
<OnLoad>
self:RegisterEvent("CONFIRM_TALENT_WIPE")
</OnLoad>
<OnEvent>BenillaTalentWipeConfirmDriver_OnEvent()</OnEvent>
</Scripts>
</Frame>
</Ui>