Skip to content

Lua API edges: tradeskill filters, rolls, autocast, bindings and mail - #1102

Merged
samwhosung merged 13 commits into
mainfrom
sess/luaedges
Oct 13, 2026
Merged

samwhosung merged 13 commits into
mainfrom
sess/luaedges

Conversation

@samwhosung

Copy link
Copy Markdown
Owner

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 #1048
Fixes #1049
Fixes #1055
Fixes #1072
Fixes #1071
Fixes #1053
Fixes #1052
Fixes #239

🤖 Generated with Claude Code

🤖 Generated with Claude Code

samwhosung and others added 13 commits October 13, 2026 10:30
The subclass and inv-slot setters check the index against the held list
(0x4ffcbb, 0x4ffed9) and require a numeric on/off (0x4ffcde, 0x4fff0c)
before touching state; an index at or below 0 sets all without reading it.

Fixes #1048

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x61bdf0 has no range test on the type: a type the server ignores
still goes out and closes the roll with CANCEL_LOOT_ROLL (0x61bf2a),
and the arguments are number-checked with the binding's usage line
(0x4c3370, 0x4c33e0).

Fixes #1049

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4be290 reads the pet-action payload, runs ClearCursor(1,1) whatever
is held, and drops a held pet action on the slot (0x4bce00) instead of
toggling. It also raises the usage line and "Invalid slot" (0x4be2a6,
0x4be2d5) before touching the cursor. The arm is shared with
PickupPetAction.

Fixes #1055

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4aef38 pushes the constant 1.0 for a nonzero item entry
([rec+0x120]) and nil otherwise.

Fixes #1072

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4ad050 ends every arm (send, take money, take item, return, delete,
each success and refusal) at one tail that signals event 0x202
(0x4ad15f-0x4ad16a). Results now queue in arrival order and the feed
fires the event after each one's line, compose reset and
CLOSE_INBOX_ITEM.

Fixes #1071

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4ad1b0 ends each list parse in the event (0x4ad5c6-0x4ad5d6),
changed or not. The feed counted only a differing snapshot. Lists now
count per result; the answer to this client's own take re-sync, which
the reference has no packet for, stays silent. The throttled
CheckInbox half (0x4aeaf3) was already in place.

Fixes #1053

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference signals it at a successful SetBinding (0x4b8056) and at
the copy of a set into the live table (0x4b649d); reading a
Bindings.xml (0x4b6f70) signals nothing. The app fired on every
generation bump, so a LoadAddOn with a Bindings.xml signalled it. A
host load now owes the signal; the generation only re-derives dispatch.

Fixes #1052

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference edits its held rows at each success arm and asks the
server for nothing: take money and take item (0x4ad6b0, 0x4ad7b0)
clear the field and purge with CMSG_MAIL_DELETE, keeping the row
until the delete result; return and delete remove the record
(0x4ad910); the copy arm sets COPIED (0x4ad8c0). Each fires
MAIL_INBOX_UPDATE (0x4ad79e, 0x4ad8a9, 0x4ad8f7, 0x4ad961) before the
tail, which lifts the lock ahead of MAIL_FAILED (0x4ad164).

Drops the CMSG_GET_MAIL_LIST after a take and its silent_lists
counter. The diff fires only for cache arrivals and the read mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The item leg purges once the money is gone and the mail is an auction
notice or has neither a text id nor a mail template id (0x4ad7fd,
0x4ad809). A quest or event reward mail carries a template id, so it
stays with its text.

Fixes #239

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lock clears only at the tail (0x4ad164), before MAIL_FAILED, and
a list parse clears it before its event (0x4ad5d0), so the arm's own
events run with it held (0x4af90c). A result queued when the window
closes still fires: 0x4ad050 tests no mailbox, and a purge sends
CMSG_MAIL_DELETE with or without one (0x4ad74d). The fallback and
received_mail notes now name the reference sites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The seed's copy into set 3 (0x4b649d) and SetBinding (0x4b805b)
signal separately; a verb no longer pays the load's debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4bcbb0 reads [0xb71438+0x28], one word past the bar, with no
bounds check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0x4acd50 (cl=1) forgets the mailbox and touches no pending result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samwhosung
samwhosung merged commit dd3983a into main Oct 13, 2026
@samwhosung
samwhosung deleted the sess/luaedges branch October 13, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment