Unit events fired from a per-frame diff of each token's values: a new target re-fired its events, a roster packet fired member events, a `targettarget` token appeared, and cost-modifier changes fired no UNIT_MANA.
In 1.12.1 they come from field watchers (`0x51bbb0`, `0x5e2510`, `0x5dd8a0`) and the flag callbacks `0x5ee990` and `0x5ff580`, signalled per values block through `0x515e50`, and from party records compared on member stats (`0x5f0b80`).
Now every unit event fires from a field-watch notice or its packet. That covers health, power, flags, auras, rest, PvP, play time, regen, pet attack, the pet bar and the guild tag. Name answers signal only on a cache miss. The per-frame fires are gone.
Tests: each arm's notice and order, and no-fire tests that fail on the old feeds.
Fixes#1389Fixes#1390Fixes#1393Fixes#1394Fixes#713🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
**What was wrong.** The loose-file index walked every folder below the install on the first open. The walk followed links and blocked the frame. A large tree under the install, such as a Wine prefix whose `z:` links `/`, left the window empty while memory climbed (6.6M keys, about 4 GB).
**Reference.** The walk at `0x646ea0`/`0x646910` follows links and keeps no record of visited folders.
**What changed.**
- A lookup lists only the folders along its name, each once, and caches answers until the index empties.
- Keys and skip rules are unchanged.
- A folder reached through a link now answers, as the reference's does.
- Listing on first reach is recorded as a deviation.
**Tests.** Lookups match a full walk over 1.9M probed keys. The prefix install lists 8 folders, down from 207, and reaches the menu in 0.77 s.
Fixes#1398🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README still asked for an English client. Since #1360, benilla reads the client's locale from `Wow.ini` and shows each game-data string in that language, so any 1.12.1 client works. The line now says so, and notes that development runs on English clients.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
**What was wrong.** A nameplate created during a frame drew one frame late.
**Reference.** The plate update (`0x764340`) draws at `0x764347`. Building a plate (`0x765896`) drains its batch records at `0x7658e2`. The world render runs inside the WORLD callback (`0x482d70`). So a new plate's first WORLD batch draws in the frame it was made.
**Change.** The first WORLD batch boundary is kept for a new plate. A plate released and retaken in the same sync keeps its batch records (`0x772fd0`).
**Tests.**
- `a_slot_retired_and_retaken_in_one_sync_draws_at_once`.
- The contributor's first-draw tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
Places that read the client's locale in 1.12.1 now follow it:
- **Creature type words.** `CreatureType.dbc` at the locale column (`0x51a2dc`). The tooltip gates type 10 itself (`0x52a2c6`), so `UnitCreatureType` answers it and that deviation is gone.
- **Race and class names.** `ChrRaces`/`ChrClasses` at the locale column (`0x518301`, `0x518451`), feeding `UnitRace`, `UnitClass`, `$R`/`$C`, who, friends, guild, raid, the battlefield score and the glue screens.
- **Name check.** Charsets come from the Wow.ini Region or the locale (`0x6c91b8`, `0x86ca0c`), with the Hangul syllable list (`0x86ca30`) and the per-charset caps.
- **Display.** koKR chat bubbles are left-justified (`0x4b16e7`). The loading tip font is picked by locale (`0x82f018`).
- **CVar defaults.** AutoInteract on koKR, gxWindow and gxMaximize on zhCN (`0x603368`, `0x63a738`). A saved value still wins.
Tests run at non-zero locales throughout.
Fixes#1361Fixes#1362Fixes#1363Fixes#1364Fixes#1365🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`SelectTarget` (`0x493540`) checks two things before it selects:
- a charmed player returns (`0x49359c`);
- with the spell targeting cursor up, a unit is bound to the cast and nothing is selected (`0x4935ca`–`0x4935d5`).
Every benilla selector skipped this. Now one select front models it, and every caller runs through it: the script verbs, TAB (which still advances), `AttackTarget` and the Interact attack, nameplate and body clicks (both greet first, `0x4927fd`), loot select, `/target`, and the attacker acquire. With the cursor up, `AttackTarget` and the pet Attack send the cast first.
`CastBookSpell` (`0x4b3474`) stops targeting when the cursor is the same spell.
Tests: each verb with the cursor up and down, a stock TAB with a heal's cursor up, the charmed cases, and the wire order.
Fixes#1380Fixes#1378🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In 1.12.1 the stat, XP, rest, honor and faction events come from field watches. The notify pass (`0x465330`) runs each watch once per values block, in field order, only when its bytes changed (`0x4655bb`). A first create and `/reload` run none. benilla diffed snapshots per frame, fired on first sight and lumped fields together.
`field_watch` now writes one notice per block per watch from the object handlers. The events fire from those notices:
- the unit-field bridge (`0x51bbb0`/`0x51bd50`), one per field, to every token of the guid (`0x515c50`);
- the player watches (`0x5dd8a0`);
- the skill watches (`0x5ed990`: UNIT_ATTACK, UNIT_DEFENSE, UNIT_RANGED_ATTACK_POWER);
- the weapon slots (`0x5dee30`).
The feeds only push. POSSTAT/NEGSTAT and `has_offhand` fire nothing, and the AP multipliers fire.
Tests:
- field order and per-block counts;
- silence on create;
- bridge ids pinned to `events.tsv`;
- push-before-fire order.
Fixes#207Fixes#286Fixes#1379Fixes#1381Fixes#1382Fixes#1383Fixes#1384🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Item counts and trade state, as 1.12.1 holds them.
- Counts walk mask 0 (`0x622420`): worn gear, bags, backpack and keyring, skipping broken and flagged items. A charged item counts its uses left (`0x4e6d20`). A reagent is red only when no copy is carried (`0x52f49f`). The equipped border asks the walker at mask 1.
- The trade keeps both item offers after a close until the next open (`0x4bf549`). Money zeroes on the ending statuses (`0x5d4884`), and the player getter is gated (`0x4c0706`). Traded-away items clear before `TRADE_CLOSED`.
- `TRADE_UPDATE` fires only from a getter's landed item record (`0x4c034f`).
- A stale own-side status is dropped (`0x5d49ba`). Every edit sends whatever the window state and bumps the counter, money verbs included.
Tests: each change, including the stock money re-entry.
Fixes#1356Fixes#1357Fixes#1358Fixes#1359🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
**Problem.** `localhost` resolves to `::1` first. benilla dialled every resolved address in order, so a realmd bound only to IPv4 left a Windows login waiting about 2 s on `::1`.
**Reference.** 1.12.1 resolves the realmlist host to one IPv4 address and dials it alone (`WowConnection::ConnectToHost` `0x5b6e40`): `inet_addr` (WSOCK32 ordinal 10), else the first entry of `gethostbyname` (ordinal 52). It never dials IPv6.
**Change.** The dial takes the resolver's first IPv4 address and nothing else. A host with no IPv4 address fails as unresolved.
**Tests.** `localhost` dials `127.0.0.1`. The first IPv4 address of several is dialled. A host that resolves only to IPv6 gives no target.
Smoke: green.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
The protected-action gate (`0x494a50`) now runs its input arms. Tags 2, 4 and 10 pass tainted code only under an input flag:
- the edit box's Enter (`[0xcf4dc4]`);
- a button's click or double-click (`[0xcf4da0]`);
- a running binding.
Without one they refuse silently. This covers casts through `TryCastSpell`, the pet actions, `SpellStop*`, `SpellTargetUnit`, item targeting, `TargetNearest*` and `AttackTarget`, and `ReloadUI`.
Branches the reference runs before the gate still run when the cast is refused: aura and form cancels, and the bind-on-use and soulstone legs. Queued calls replay the input events they ran under, around their own events too. So a TAB-driven `PLAYER_TARGET_CHANGED` handler casts as in 1.12.1.
`SetEuropeanNumbers` now also swaps separators in tooltip lines, both message frame classes (at show for scrolling ones), SimpleHTML, chat bubbles and nameplates.
Tests: a 30-verb census, and the stock buttons, bindings, `/cast`, spellbook and macros.
Fixes#1354Fixes#1355🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-vendors `reference/` at benilla-re `c854c4e`, which now resolves computed event ids at their fire sites. 97 events gain a producer: the 93 `CHAT_MSG_*` events and the player-field watcher's `"player"` events.
The fires change to match:
- `PLAYER_XP_UPDATE`, `PLAYER_PVP_KILLS_CHANGED` and `PLAYER_PVP_RANK_CHANGED` carry `"player"`, once per changed watch (`0x5de4b0`). A level-up fires twice.
- `UPDATE_EXHAUSTION` fires bare from the rest byte (`0x5de4e0`) and `"player"` from the pool. `UPDATE_FACTION` fires bare from the list, twice on initialize, and `"player"` from the watched index. Everything fires in field order.
- `PLAYER_DAMAGE_DONE_MODS` is produced (`0x5ddbc0`, `0x5ddbe7`, `0x5ddc0e`), and `UNIT_DAMAGE` keeps only its own fields.
- The rank watch covers all of `PLAYER_BYTES_3`, so its deviation goes.
- The shape gate reads the chat fire's shared ten-value list.
Tests: the shape gate, plus feed tests for each watch and its order.
Fixes#237Fixes#244Fixes#296🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing listened to the player's item objects after they changed. Action and trade slots diffed snapshots, so an addon missed restacks, enchants and destroys.
- **The seam.** `item_watch` emits one notice per reference handler run, in wire order. The handlers are destroy `0x5d8660`, stack `0x5d9400`, charges, entry, enchant `0x5d9a90`, record `0x5d8440`, seats `0x4f8db0`/`0x4f90d0`/`0x4f8ec0` and visible items `0x5dee30`.
- **Action bar.** Each notice recounts every item slot holding the entry and fires `ACTIONBAR_SLOT_CHANGED`, with no change test (`0x4e5c70`, 16 callers). Arrival recounts quietly, then fires slot 0 (`0x5dea50`). The per-frame poll is gone.
- **Trade.** Our slot re-sends or clears its item and fires `TRADE_PLAYER_ITEM_CHANGED` (`0x4bfb10`, `0x4bfb60`). Slot 7's enchant spell signals its side and names the enchantment (`0x4bf2b0`). `ClickTradeButton` refuses bound, quest and bag items (`0x4bfeb5`).
Tests cover every watcher, consumer order and refusal.
Fixes#1064Fixes#1062Fixes#1063Fixes#1041🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benilla read every DBC string from the enUS column and answered enUS everywhere. 1.12.1 reads its locale from `Wow.ini` in the archives (`0x40249d`). It joins `Language` and `Country` into a tag at `0xc2a2a4` (`0x402513`). It looks the tag up in the eight locale names to get the index at `0xc0e080` (`0x402562`); enGB keeps index 0.
- The chain reads `Wow.ini` with the client's ini rules: no trimming, and the first value wins.
- Every localized DBC read takes column `first + index`.
- `GetLocale` and the TOC `Title-xxXX` pick follow the index (`0x48d8b0`, `0x46ce40`).
- The logon challenge (`0x5b2115`) and the name-cache header carry the tag, so this install sends enGB.
Tests:
- A synthetic WDBC per locale.
- 43 loader probes at an empty locale.
- A byte-exact golden for the challenge.
- GetLocale in glue and in game.
Smoke: green.
Fixes#1338🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five Lua API gaps, settled at the bytes.
- `FrameXML_Debug` sets its flag only from a number (`0x488440`); it always returns the flag.
- The eight debug globals exist and return nothing (`0x83de68` rows).
- `GetTalentTabInfo` returns the tab's SpellIcon path (`0x4f30d0`).
- `SetEuropeanNumbers` stores its flag (`[0xcf4d24]`). The flag survives a reload. FontString and Button `SetText` swap `.` and `,` inside a number under the exact byte tests of `0x771c50`.
- The protected-action gate (`0x494a50`) fires `MACRO_ACTION_FORBIDDEN` or `ADDON_ACTION_FORBIDDEN`. It covers the 23 tag-0 movement calls, PitchUp/Down included, by context: a `RunScript` chunk, an insecure addon's files, inline scripts and binding bodies, or the client's own. Stack scan; the unmodelled taint cases are listed in `taint.rs`.
Tests: a test for each fact, including the gate through `LoadAddOn` of a real chain addon.
Fixes#60Fixes#410Fixes#162Fixes#566Fixes#486🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every character model frame, named or anonymous, now draws the unit its own `SetUnit` names, in a booth of its own. The seven stock-name booths are gone: the character window, pet doll, inspect, stable, dressing rooms and tabard designer are ordinary instances, driven by their FrameXML calls.
- `SetUnit` stores the GUID and builds a copy when shown and the unit is held (`0x505b50`).
- `RefreshUnit` rebuilds from the stored GUID (`0x505e40`); hide drops the copy (`0x505ce0`).
- `SetRotation` and the paint timer turn it, with the model's fallback ids (`0x505bb0`, `0x505c50`, `0x711bf0`).
- The constructor's directional light lights a fresh pane (`0x505680`).
- The stable shows the live pet's creature-template display (`0x4cb99e`).
Each change has a test that fails without it.
Fixes#1346Fixes#1347
Co-authored-by: migwynkriid13 <335116281+migwynkriid13@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: migwynkriid13 <335116281+migwynkriid13@users.noreply.github.com>
The Warden `Deviation:` lines now give the reason, not only the fact. Warden's answers come from a module, native Win32 x86 code the server sends and the client maps, links and runs in its own process (`0x7a79d0`). The client parses none of the payload itself (`0x6ca5c0`). benilla runs no such code on any platform, so it has nothing that could answer, and a server that requires Warden would kick it 30 s in (`Warden.cpp`).
Fixes#1349🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tooltip lines, EditBox byte caps and button slot textures, as 1.12.1 has them:
- A tooltip line with no text on either side is not added, and only a non-empty side is written (`0x530270`).
- A tooltip holds as many lines as it has `TextLeft<n>`/`TextRight<n>` pairs at load (`0x529650`), so a bare `GameTooltip` holds none. `AddFontStrings` adds one (`0x529940`).
- A clear blanks the left text and keeps the right (`0x530050`).
- An EditBox's `<FontString bytes="N">` and `SetMaxBytes(N)` cap it at N−1 bytes (`0x77a225`, `0x798f30`); `GetMaxBytes` answers N. Over the cap, the box drops a character or a whole link. The chat and who boxes stop at 255 bytes.
- A button texture path that does not load makes no slot region and keeps the old art (`0x7790ce`).
Each change has a test that fails without it.
Fixes#165Fixes#177🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cooldown reads, the GCD after an event, and lost control, as 1.12.1 has them:
- A cooldown held until an event (Stealth, Shadowform) reads start now, duration 1 ms, enable 0 (`0x6e1503`, `0x6e1517`). Enable stays 0 once a held leg sets it, and the Lua getters answer the call's own time for a held start.
- An item's own category overrides its spell's (`0x6e1457`).
- `SMSG_COOLDOWN_EVENT` restarts the GCD from the event, which shares the recovery start (`0x6e15d8`, `0x6e185a`).
- While control is lost, spells, macros, spell-less items and forms grey unless the spell's immunity scan exempts it (`0x6e3dc3`–`0x6e3e4c`).
- Every self create gives control back (`0x5dea50` → `0x5fa600(1)`), firing `PLAYER_CONTROL_GAINED` when it was lost.
Each change has a test that fails without it.
Fixes#1296Fixes#1297Fixes#1298Fixes#754🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`docs/DEVIATIONS.md` lists every place benilla deliberately differs from 1.12.1, generated by `scripts/genmap.sh` at every land beside `docs/MAP.md`:
- The settings that ship off the reference default, with each one's reason, from the `Deviates` rows.
- Each `Deviation:` comment's first sentence, linked to where it lives, grouped by crate and module.
A test fails if a `Deviates` row takes a shape the generator would misread. README, METHOD and CONTRIBUTING link the doc.
Fixes#1289🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Loose files in the install now answer the opens 1.12.1 flags, ahead of the archives (`0x647e60`, benilla-re `storm/mount`).
- The index walks the install folder, then `Data\`, keyed case-insensitively; the first entry wins.
- It answers interface files and textures, fonts (bare name first), cursors, sound, model frames and the minimap arrows.
- A `.MPQ` file answers its name from inside it.
- A name written with `/` misses, as in 1.12.1.
- A found file that fails to read does not fall back.
- The index empties where the reference empties it (`0x646fc0`): after saved variables, `AddOns.txt` and the glue sweep.
- A `Blizzard*` addon folder holding its `.toc` is skipped unread (`0x51fb50`), so the archive's copy loads. Nothing in the install is moved.
Each change has a test that fails without it.
Fixes#1144Fixes#1145🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lua errors and chat gates where 1.12.1 has them:
- `GetCVar`, `SetCVar` and `GetCVarDefault` raise `Couldn't find CVar named '%s'` (`0x488be7`). Every script-visible CVar of the reference is now registered, at its default, so only a name 1.12.1 lacks raises.
- `SendChatMessage` raises on an unknown chat type (13 tokens, `0x49f7a0`), and on a whisper or channel line with no target (`0x49f310`, `0x49f4ca`).
- A non-string type is SAY.
- With no player, the call returns quietly.
- Party, raid and raid warning lines are refused outside their group (`0x49f33e`–`0x49f4c7`). A group leader's raid and battleground lines go out as the leader types (`0x49f3bf`, `0x49f48b`).
- A dead or ghost player's say, yell and emote are refused with `ERR_CHAT_WHILE_DEAD` (`0x49f592`).
Each change has a test that fails without it.
Fixes#1284Fixes#373Fixes#380Fixes#1335Fixes#1333🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Corrupted Ashbringer's glow bones carry constant Stand rotation keys that set the
plane of its XY-quad emitters (flag 0x1000); at rest pose the quads lay 90° off. The
client arms every M2 with animation 0 at load, so a held item with emitters on its own
bones now gets a skinless RigPose and an idle player, and its emitters ride their bone
anchors. The character window and dressing room carry the item's skeleton and idle
(EffectRig) and pose the effect host the same way.
Built and tested on macOS.
The event gates now read every place benilla fires a Lua event. One scanner finds firing functions by signature, with `queue_event`, `fire_global` and the glue closures included, and resolves names bound to locals. Tests fail on any other path into the queue. The shape gate refuses a list or name it cannot read. The `BENILLA_` exemption and the weaker exe-string gate are gone.
What the gates exposed, each against the reference:
- `GOSSIP_SHOW`, `MERCHANT_SHOW`, `MERCHANT_UPDATE`, `TRAINER_SHOW` and `TRAINER_UPDATE` fire with no arguments (`SignalEvent 0x703e50`).
- `PARTY_MEMBER_ENABLE`/`DISABLE` pass the slot as a number (`%d`, `0x4e869d`).
- `FRIENDLIST_SHOW`, which 1.12.1 lacks, is no longer fired; `FRIENDLIST_UPDATE` is.
- The three bind-confirm events count as produced. Two gap rows are reworded.
Fixes#86Fixes#202Fixes#313🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The in-flight cast slot is pushed and popped where 1.12.1 does:
- Every cast attempt pushes it (0x6e5026), and only an auto-repeat spell is popped after the send (0x6e5935 → 0x6e5989), so a ranged shot holds the slot until its result and a press meanwhile is refused with 0x61.
- An item use holds it only with `ITEM_FLAG_PLAYERCAST` (0x6e500b–0x6e501f).
- The slot is popped by the spell's `SMSG_CAST_RESULT`, success or failure (0x6e7408 → 0x6e741a), never by the GO.
- `SpellStopCasting` with the targeting cursor up aborts it and returns 1 (0x6e6e80).
- A same-spell re-press bails with no red line (0x6e4d43).
Each change has a test that fails without it.
Fixes#1291Fixes#1295Fixes#1303🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Five fixes to how `SMSG_UPDATE_OBJECT` is applied, each against the client's code:
- An out-of-range block never releases the active player (0x465f39–0x465f45).
- A movement block for the unit we move, the player or a possessed unit, is dropped (0x4670a5–0x4670bb).
- A create spline reads its three final-facing fields independently, in the order point, GUID, angle (0x47f0bf, 0x47f0e8, 0x47f0f9), so a server that sets two no longer breaks the packet.
- A game object is placed by its create block's position over its position fields (0x5f7046), and a re-create re-poses units only (0x46638c).
- The leave-world sweep's comment names the destroy path alone.
Byte-exact fixtures for the spline; each change has a test that fails without it.
Fixes#1307Fixes#1308Fixes#1309Fixes#1310Fixes#1311🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
44 Lua functions 1.12.1 registers were undefined, so an addon calling one raised.
- Units: `UnitCanAssist` (0x516bb0, computed as the first unit toward the second) and `UnitIsTrivial` (0x519d70). The assist rule now runs player-to-unit where the client does (0x6066f0), which corrects UnitBuff's and the TAB scan's answers for reputation factions.
- Quests, trainers, crafts: `GetActiveLevel`, `GetAvailableLevel`, `OpenTrainer` and seven skill-line functions.
- GM survey, LFG, lottery, minigame, skill points and the file verbs, from the install's tables: the survey (id 6) and LFGDungeons are loaded, and `GMSurveySubmit` (0x32a), `LFGQuery` (0x1ff), the lottery verbs (0x334, 0x336) and `BuySkillTier` (0x21f) send what the client sends.
Every send has a byte-exact golden; usage strings are the client's.
Fixes#333Fixes#335Fixes#338🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two follow-ups on the interaction latch:
- The NPC's hello and goodbye come from the latch: a window registering for a different non-player unit plays the hello (0x49318f), a release to nothing plays the goodbye (0x493210), and a swap or a walk-away (0x493305) plays none. Every window greets alike; a game object or a player says nothing.
- Death and shapeshift close the window: the player's death releases with the goodbye (0x5e9a51), the latched unit's death releases without it (0x605950), and a shift into a form where IsShapeShifted holds and the row lacks flag 0x8 releases (0x5de07f).
Tests pin the hello and goodbye per window, the swap and walk-away, and each release, and fail on a goodbye where none plays.
Fixes#1287Fixes#1288🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
FontString text is laid out by 1.12.1's line kernel (0x5c7470) instead of a whitespace-only wrap.
- Breaks: the classifier 0x5c7780, after `-`, `:` and `/`, before whitespace, and between CJK and Hangul characters, with its 25 openers and 57 closers. Whitespace above U+0100 is Windows' C1_SPACE set, as the client asks it.
- A row ends at the last break, else at the glyph that did not fit; the skip after it crosses blank lines and stops at a colour code; a glyph wider than the row ends the layout.
- `nonspacewrap` (off by default, the XML attribute and `SetNonSpaceWrap`) carries a force-cut row into the next (0x5c76ea).
- `maxLines` cuts with "..." at maxLines × the line pitch, also for an auto-height string (0x771ec0, 0x7729b0).
An emulation of the client's draw loop, fit walk and EditBox row table matches on 400k fuzzed strings.
Fixes#217Fixes#218Fixes#219🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The gates memo kept its verdict for a change under `docs/` or in a top-level `*.md` only, so a change to an issue or PR template ran the whole chain again. No gate reads the templates; the workflows under `.github/workflows` stay code.
Scripts only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NPC windows share 1.12.1's one interaction latch (0xb4e2d0). Every opener closes the current holder through the dispatcher 0x493310, in its order, before it opens (0x4930d0); each close core releases on its own cell, so a direct close while latched fires its `*_CLOSED` twice (quest once: it zeroes its cell first, 0x501201).
All 13 windows are on it: gossip, quest, merchant, taxi, trainer, bank, stable, registrar, tabard designer, mailbox, auction, trade and item text. Opening a vendor during a trade closes the trade and sends one `CMSG_CANCEL_TRADE` (0x4bf527); walking away closes a trade at the interaction leash (0x493230). A second gossip menu from the same NPC closes nothing (0x4e1fb8). A chained quest turn-in leaves the panel up (0x5dc6d7).
Tests pin the event order and count for every pair of windows, and the packets sent.
Fixes#1054Fixes#1099🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CVars and Lua arguments, each against the client's code:
- A CVar row carries the reference's refusing callback, run before the value is stored (`CVar::Set`, 0x63df7d): the video rows, six camera rows, `farclip` (NaN passes, as 0x688d40's unordered compare lets it), `frillDensity`, `gxTripleBuffer` (0 or 1, 0x63afe0) and `gxRefresh` (the 11 rates at 0x8645e0).
- `RegisterCVar` creates at most 30 CVars per process (0x488b25); `GetCVar` and `GetCVarDefault` raise their usage lines.
- `Minimap:SetMaskTexture`, `CloseLoot(1)` (ERR_LOOT_NO_UI, 0x48f27b) and the onSelf of `UseContainerItem`/`UseInventoryItem` follow the client.
- Lua's numeral reader has no hex and takes `d` as an exponent, as the client's strtod (0x4112d1).
Each has a test that fails without it.
Fixes#558Fixes#559Fixes#567Fixes#696Fixes#988Fixes#989Fixes#1025Fixes#302Fixes#366Fixes#1275🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four UI-core fixes, each against the client's code:
- Text breaks on `\r` and `\n` before any flag is read (0x5c286e); `|n` is refused only under flag 0x200, which no stock style sets.
- A texture or sound open with flag 1 or 2 asks the install's loose-file index first (0x647f89), then the archives, so an addon's loose file shadows the archive copy.
- A tiled backdrop divides the frame's own rect by the tile size (0x77f0c0), in FrameXML and glue alike.
- A chat frame releases every live link button before placing any (0x788c00), and a resize in screen units, insets times scale (0x788342), relays the lines and rebuilds them.
Each has a test that fails without it.
Fixes#877Fixes#880Fixes#898Fixes#962🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh-clone walk-through as a new contributor found four gaps in the docs:
- No quick test loop: `scripts/check.sh` has nothing to check on a clean clone, and `cargo test -p <crate>` was not mentioned. "The loop" now says both.
- The doc-link lint is a full `cargo doc` of the workspace; METHOD and the script's header now say so.
- What to cite while a benilla-re gap is still open: the client address, with the benilla-re issue or pull request linked.
- When `reference/PIN` moves: only with a change that needs a newer benilla-re row, to a commit on its main. Stated in CONTRIBUTING and `reference/README.md`.
Docs only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`reference/` held benilla's own copies of the reference's tables, some derived by its own scripts from older inputs: the fire-site table kept one event id where a site fires two, and credited glue-screen sites to in-game events.
Now `reference/` is benilla-re's tables at the commit `reference/PIN` names, byte for byte: bindings, events, glue events, messages, event arguments, verb events, the glue surface, the Lua globals, chat types and groups, and CVars. `scripts/sync-reference.py` copies them, and its `--check` runs in the gates and in CI. Four generators and nine old files go, and every reader moves to the new columns.
New tests hold the chat type, chat group and CVar tables to the copies; the CVar rows already filed are listed as known.
Fixes#245Fixes#960
Part of #244🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributors and their agents had no word on how to use the reference beyond a link.
- `AGENTS.md` sends an agent to benilla-re before it builds: clone it beside the repo and grep it, or look an address up on its site.
- `docs/CONTRIBUTING.md` gets "The reference": how to look a fact up (the site, `symbols/`, `tables/`, `systems/`), how to weigh a row's confidence, and that a gap or an error goes to benilla-re as an issue or a finding.
- `docs/METHOD.md`, the pull request template and the issue chooser say the same in a line each.
Docs only; `scripts/check.sh` is green.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In 1.12.1, `TargetByName` (`0x489d60`), `TargetUnit` (`0x4899d0`) and `ClearTarget` (`0x489ff0`) commit through `SetSelection` (`0x493540`) before they return, so the next line of the chunk reads the new target. benilla queued them, so `UnitName("target")` on the next line read the old unit.
The bindings now update the `"target"` view and the resolver's guid at once. They rank over a per-frame candidate feed that shares the app scan's candidate test and rank. A pick `SetSelection` refuses (not selectable, `0x4935ee`) leaves the view alone. The unit feed re-pushes the committed selection the next frame. A full tie goes to the lower guid, written as a deviation.
Tests: the chunk reads the pick; namesake ties, refused picks and the re-push, in benilla-ui and through the app's real feed.
Supersedes #1225, whose branch GitHub would not let us push to.
Co-authored-by: kalistoking <148718830+kalistoking@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- A MessageFrame's link is text; only chat lines take link buttons
- set_spans' doc says only a ScrollingMessageFrame's spans take buttons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
Every shown EditBox now keeps the client's text window, focused or not. An unfocused box used to cut long text to "prefix..."; it now shows where its caret last left it, re-windowing at 0.25 or 0.75 of the width when the caret leaves (0x77d705–0x77d858, 0x77d320). A password box never re-windows (0x77d769) masks one `*` per byte, and copies as an empty string (0x77e1f8). A window starting inside a coloured run keeps its `|c` code (0x77d8ba).
OnCursorChanged reports the font's line height as `h` (0x77b970), and measures `x` from the window's start (0x77dcd8) by the text's justify (0x77db63).
Paste types the clipboard one character at a time through the typed-character insert (0x77e250 → 0x77c200), so `|` doubles, a tab is four spaces, and OnChar fires per character.
Tests cover each through the Lua surface, plus an app test drawing an unfocused window.
Fixes#728Fixes#739Fixes#740Fixes#744🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benilla's reference facts come from reading the 1.12.1 client at its bytes. That work is now public as [benilla-re](https://github.com/samwhosung/benilla-re): one row per function, global and field, a doc per system, and the data tables, each cited by client address.
This links it from the README, from METHOD's "The reference first" and from CONTRIBUTING's step on stating the reference fact, so a contributor knows where a client address leads. Docs only; no code changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven Lua API and event edges departed from 1.12.1:
- SetTradeSkillSubClassFilter and SetTradeSkillInvSlotFilter now raise their errors (0x4ffc70, 0x4ffe60).
- RollOnLoot sends any roll type (0x61bdf0).
- TogglePetAutocast drops a held pet action instead of toggling (0x4be290).
- GetInboxHeaderInfo's hasItem is 1, not the count (0x4aef38).
- UPDATE_BINDINGS fires only from SetBinding and the copy into set 3 (0x4b8056, 0x4b649d).
Mail now follows the result handler 0x4ad050. Take, return and delete edit the rows in place, with no re-list, and each arm fires its own MAIL_INBOX_UPDATE. MAIL_FAILED fires for every result, after the request lock lifts (0x4ad164). Every list result fires MAIL_INBOX_UPDATE. Taking a template mail's item keeps the letter (0x4ad7fd).
Tests cover each.
Fixes#1048Fixes#1049Fixes#1055Fixes#1072Fixes#1071Fixes#1053Fixes#1052Fixes#239🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the stock credits screen the fades drew as solid black boxes over the text, and the black bars covered the borders.
A texture's gradient now tints its four vertices over the texel (0x77f910, TL BL TR BR). A gradient alone draws nothing, and any vertex-colour write collapses it (0x77f750).
A layer batch sorts its quads by texture handle at End (0x7731a0), with an exact port of the client's qsort. Its tie order was checked against the client's own code. The client's handles are heap addresses, so different textures rank by a creation stamp that follows allocation order. That is a narrowed Deviation.
Extract costs what it did before. The options window's ground dim moves to BORDER to keep its look.
Tests cover the gradient, the sort and the stock credits frame.
Fixes#874Fixes#1095Fixes#1092🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leaving the world (a /reload, logout or worldport) kept loot, trade, mail, the auction house and the other NPC windows open, and a reload kept the target. A loot release for another object, or with result 0, closed the open window.
In 1.12.1, the sweep 0x490a80 closes each window in its legs, in the dying interface: loot with its release, trade cancel, mail, auction, gossip, trainer, taxi, merchant, tabard, stable and the rest. A /reload first drops the target loudly and ends a follow; a logout runs the sweep first and clears the target silently. The release response closes only for the latched guid with a nonzero result (0x5ec090).
benilla now runs those legs in that order on each root, gates the release, and lets each leg drop its own item locks.
Tests cover each leg, each root's order and the release gate.
Fixes#1066Fixes#1044Fixes#209🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failing test gate printed only its log's last 30 lines. Those are the doc-test runs after the failure, so the failing test's name and its panic were missing from both the gate output and the land log.
scripts/gates.sh and scripts/check.sh now print the panic lines, each test's FAILED line and any compiler errors from the log first, then the tail as before.
Checked on a sample failing log; both scripts pass `bash -n`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The glue booth threw its model away where 1.12.1 keeps it. So the create preview restarted its animation on every customization or class change, and the login scene restarted after Credits.
In 1.12.1, the create setters (0x478790 and its siblings) and the re-dress 0x470800 update the same CharacterModel. Only a race or sex change builds a new one (0x470b70). A hidden ModelFFX is unlinked from its strata bucket, so its OnUpdate (0x76d7f0) and its clock stop until it shows again, and the clock steps in whole milliseconds (0x76d846).
Now the booth re-dresses its body in place and keeps a hidden or left scene parked, resuming it on return. Each scene has its own clock (one SceneClock on its root), its own materials, so two scenes on one file stay independent.
Tests cover the keep, the park, the clocks and the cleanup.
Fixes#1083Fixes#1068🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SMSG_SET_FORCED_REACTIONS (0x2A5) was never read, so a forced-reaction aura such as the Gordok Ogre Suit left the ogres hostile.
The client stores the table whole (handler 0x4d59a0) and looks a target faction up in it (0x4d6490). Unit-to-player reactions consult it at 0x6065e6, behind the leading rungs and capped at 6. Player-to-unit reactions consult it at 0x6063e0. On arrival the handler fires UNIT_FACTION for every bound unit. ShutdownGame clears the table, never a worldport.
benilla now decodes the table onto Reputations, answers both reaction directions from it, fires UNIT_FACTION on each arrival, and clears it at the session's end.
Tests cover the decode, both directions against an at-war faction, the caps, the replace and clear, and the target frame recolouring.
Fixes#78
Supersedes #1080
Co-authored-by: kalistoking <148718830+kalistoking@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Four stock glue screen defects:
- Credits raised a Lua error: PlayCreditsMusic was unbuilt. It now fades the theme and plays the seven city intro tracks in turn (0x45b000, table 0x836028).
- HideCursor/ShowCursor (0x46db70) only set a flag. The pointer now hides over the credits and the movie on every platform.
- A world status past the 83-row table read RESPONSE_FAILURE's text; GetStatus formats it "(N)" (0x5aa960).
- A plain Model pane (the realm wizard) was lit only by the widget's light. It now takes its M2's own lights, as 0x718960 emits them, under the widget light and fog.
Also writes the Deviation line for the config save: benilla saves a quiet second after a change, where SaveConfig (0x63d980) writes only at world entry, logout and shutdown, so a crash keeps the settings.
Tests cover each.
Fixes#1070Fixes#1069Fixes#1058Fixes#1082🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scroll child drew by its own strata and level. So on the stock create screen the info text drew over the icon frames raised beside it.
In 1.12.1, SetScrollChild (0x786ce0) flags the child's subtree. The flat pass skips flagged frames (0x7659df). The ScrollFrame's HIGHLIGHT callback (0x787220) draws the subtree clipped to its hit rect, frame by frame in link order (0x76b3f0), and draws nothing for an empty clip. Picking keeps each frame's own level, clipped to the first unflagged ancestor (0x76b020).
benilla now draws and picks the same way. A frame shown or hidden inside the subtree keeps the others' order. The options window's scroll trough sits at its ScrollFrame's level, so the page still draws over it. Deviation: a scroll child reparented out draws once, not twice.
Tests cover the order, nesting, clip, pick and the stock create panels.
Fixes#1084🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The glue manager's verbs queued their work for a later frame. In 1.12.1 each verb calls CGlueMgr's function, which writes screenState and signals its dialog before the call returns, then begins its operation. So a dialog that its own OnShow dismisses was drawn for a frame here.
Now each verb runs its synchronous half inside the binding, against the one host GlueMgr the VM shares. Network work stays asynchronous. The Update arms (0x46b930) fire their signals before their later state writes. A failed world connect's "Retrieving realm list" closes on its reply, and a failed logon closes the link but keeps an unattended resubmit.
GetServerName reads the realmName CVar and the selected realm's flags live (0x46d280).
Tests cover each verb's events inside its call, a verb nested in another's fan-out, each arm's order, and the refused login never showing its first dialog.
Fixes#1065🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five item-use paths differed from 1.12.1's bytes:
- PutItemInBag swapped a worn item instead of storing it (0x4c7d44), and sent a bag into itself (0x4c7cea).
- UseSoulstone skipped the cast cancel before its use (0x48ae6b → 0x6e4940).
- The bar's equip left a held item on the cursor; it now runs 0x5e1840 → SetCursorItem.
- The bind-on-equip confirm emptied the cursor; the item now stays held under the question (0x5e16ce).
- Item use ignored loss of control. The dispatcher's requirement and control gates (0x5d8e0e, 0x5d8eaa), the equip and SetCursorItem gates, the fear/charm exemption (0x6e9d70) and the trade-window refusal (0x1b4) now apply. They read our own character's control only (0x5fa600).
Tests cover each path and gate.
Fixes#1057Fixes#1075Fixes#1078Fixes#1076Fixes#1077🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verb events fired from app feeds a frame late; 1.12.1 signals inside the call.
Now each verb raises its events in place. Feeds push only what their own server source changed, so a verb's write is never rolled back.
Also, from the bytes:
- The score board waits on pending names (0x4aa216).
- The recruitment cascade runs inside its verb.
- Seven mail verbs share the request lock 0xb6efc8; the mailbox keeps its inbox across a close.
- StartAuction runs its gates, sends the attached guid and empties the slot in the call.
- The tradeskill repeat counts, disarms and resets as 0x4fd7b0 and 0x4fc750 do.
- Quest folds carry across a /reload.
Tests cover each event's timing and the feed rule.
Fixes#1008Fixes#1009Fixes#1010Fixes#1045Fixes#1046Fixes#1047Fixes#1050Fixes#1051Fixes#1059🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>