benilla-re systems structs docs

Script::ClickSendMailItemButton

function · ui · primitive

Address
0x4adef0 · 510 bytes, up to 0x4ae0ed
Signature
int __fastcall (lua_State *L)
Meaning
Checks the cursor item for mail, then swaps it with the attachment
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/mailsend#attaching-an-item

Finding: Attaching an item in ui: composing and sending mail

ClickSendMailItemButton() swaps the cursor's item with the attachment. It reads the cursor payload without testing its kind. An item the object manager knows is refused with ERR_MAIL_BOUND_ITEM when it is bound (ERR_MAIL_QUEST_ITEM when its template's bonding is 4 or 5), ERR_MAIL_CONJURED_ITEM for the conjured flag or either of two record flags, and ERR_MAIL_BAG for a bag that holds anything. An unknown item passes. If the cursor item is already the attachment the cursor is cleared; otherwise the new GUID, container and slot are stored, the old attachment goes onto the cursor, and MAIL_SEND_INFO_UPDATE fires. An empty cursor therefore picks the attachment back up.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 10

Calls and jumps by a bare address, from tables/calls.tsv.