benilla-re systems structs docs

Script::PickupSpell

function · ui · orchestration

Address
0x4b42a0 · 71 bytes, up to 0x4b42e6
Signature
int __fastcall (lua_State *L)
Meaning
Picks up a book spell onto the cursor
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/spellbook#picking-up-a-book-spell

Finding: Picking up a book spell in ui: the spell book

PickupSpell (0x4b42a0) runs 0x4b3260(slot, book). It clears the cursor first. If the cursor held the same spell it plays igSpellBookSpellIconDrop; if it held another spell, or the slot holds no spell, it stops there. Otherwise the slot's spell goes onto the cursor, as a spell (0x494d20) or, for the pet book, as a pet action (0x494e20 of the pet spell record from 0x4bd160), with the sound igSpellBookSpellIconPickup, after the setter returns, whether or not the cursor took the spell. The two kits are 0x4b32e0 (drop) and 0x4b32f0 (pickup): each loads its name into ecx and jumps to SndInterfacePlayInterfaceSound (0x458030), so what is heard is the interface sound row of that name (sound/interface#interface-sounds-by-name); the exe holds only the name.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 3

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