benilla-re systems structs docs

CancelCast

function · spell · primitive

Address
0x6e4940 · 397 bytes, up to 0x6e4acc
Signature
void __fastcall (uint8_t failed, uint8_t send, uint32_t reason)
Meaning
Drops the targeting word or sends CMSG_CANCEL_CAST, pops the in-flight spell and fires a SPELLCAST stop event
Confidence
verified, proof one
Finding
spell/cancel#cancelling-a-cast

Finding: Cancelling a cast in spell: cancel

0x6e4940(failed, send, reason): with a targeting word up it clears the word and sends nothing; otherwise, with a spell in flight and send set, it sends CMSG_CANCEL_CAST (0x12f), a u32 in-flight spell. Then it pops, releases the placement model and sets both cursors to Point. When the record's caster is the active player it fires SPELLCAST_STOP (338) for failed 0, else SPELLCAST_INTERRUPTED (340) for reason 0x23 or 0x24 and SPELLCAST_FAILED (339) for any other, all without arguments; clears the caster; and, when the active player's object exists and is a player, unless the record's spell has AttributesEx 0x4, calls 0x614150(player, spell, 0). With failed set it last calls 0x4fd790, which ends a trade-skill repeat.

The derivation is in the doc.

Callers 18

Callees 15

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