benilla-re systems structs docs

ReportCastFailure

function · spell · primitive

Address
0x6e1a00 · 2138 bytes, up to 0x6e2259
Signature
void __fastcall (uint32_t spell, uint8_t reason, int32_t arg3, int32_t arg4, uint8_t fromServer)
Meaning
Reports a failed cast: picks the message id, builds and fills the reason text, shows and logs it, fires the event
Confidence
verified, proof one
Finding
spell/failures#reporter-inputs-and-first-effects

Finding: Reporter inputs and first effects in spell: failures

0x6e1a00 is fastcall(spell, reason) with three stack arguments and ret 0xc: two words (−1 when there is none) and a byte that is nonzero only from SMSG_CAST_RESULT. It looks the spell up in Spell.dbc by id. First, for every reason: when the spell is the trade-skill repeat spell, 0x4fd790 clears that spell and fires UPDATE_TRADESKILL_RECAST (502). Then, when the record and the active player exist, 0x458a50 takes the spell and the player as a unit and passes the id in field 2 of the Resistances.dbc row named by the spell's school, field 1, to the sound call 0x458870. After the reason's text is built, the from-server byte alone calls 0x6e1630 (cooldowns) with the spell.

The derivation is in the doc.

Callers 9

Callees 26

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