benilla-re systems structs docs

Script::CastSpell

function · ui · orchestration

Address
0x4b42f0 · 116 bytes, up to 0x4b4363
Signature
int __fastcall (lua_State *L)
Meaning
Casts a book spell, on the player when the self flag is set
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/spellbook#casting-a-book-spell

Finding: Casting a book spell in ui: the spell book

CastSpell (0x4b42f0) runs 0x4b3300(slot, book, target); the target is the current target, or the player when the self flag is set. A spell on the cursor goes to 0x4b3260 instead. The slot's spell is cast directly when its first effect is 47. If its aura toggle is up (0x4b36f0, the active icon test on the player or pet) the aura is cancelled (0x6e7040; CMSG_PET_CANCEL_AURA 619 for the pet). If it is the spell awaiting a target, targeting stops. A spell with a shapeshift aura whose form is the current one cancels the form, or does nothing when the form record's flag +0x2c & 2 is set. Else it casts: 0x6e5a90, or sends CMSG_PET_ACTION for the pet book.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 5

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