benilla-re systems structs docs

Script::UseSoulstone

function · ui · orchestration

Address
0x48ad70 · 285 bytes, up to 0x48ae8c
Signature
int __fastcall (lua_State *L)
Meaning
Sends the self-resurrection packet, or uses a self-resurrect item
Confidence
verified, proof one
Finding
ui/deathui#soulstone-and-self-resurrection

Finding: Soulstone and self-resurrection in ui: death, the corpse run and resurrection

HasSoulstone() answers only while UNIT_FIELD_HEALTH is 0 or less. It then reads PLAYER_SELF_RES_SPELL (player block +0x1030): a spell id in range pushes the spell's name (Spell.dbc +0x1e0 plus 4 times the locale index), an id out of range or a missing row pushes UNKNOWN, and 0 asks for a carried self-resurrect item and pushes its name; no item gives nil. UseSoulstone() has no health test, reads no argument and pushes nothing: with the field set it sends opcode 0x2b3 with no body (the frame bytes are 00 04 b3 02 00 00); with 0 it finds the item (0x5ed630), cancels a pending cast and uses the item.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 7

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