CancelCast
function · spell · primitive
- Address
0x6e4940· 397 bytes, up to0x6e4acc- 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
- Script::UseSoulstone ui
- CancelCastAndClearCursor ui
- Script::Jump input
- CInputControl::SetCommands input
- CGItem_C::Deactivate objectlayer
- HandlePlayerNotice objectlayer
- CGPlayer_C::OnDied objectlayer
- CGPlayer_C::StartMeleeAttack objectlayer
- CGUnit_C::OnDied objectlayer
- ReportCastFailure spell
- StopSpellTargeting spell
- StopSpellTargetingForOtherCaster spell
- TryCastSpell spell
- CastSpellByNameText spell
- BindSpellTargetTradeSlot spell
- Script::SpellStopCasting spell
- CancelNextSwingSpells spell
- CastResultHandler spell
Callees 15
- CDataStore::PutUInt32 base
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- SignalCurrentSpellCastChanged ui
- ClearTradeSkillRecast ui
- SetCursorMode ui
- SetBaseCursorMode ui
- ClientServices::Send net
- CGUnit_C::StopSpellKits objectlayer
- CWorld::DestroyMapEntity terrain
- GetCastSpellId spell
- IsCastInFlight spell
- IsSpellTargeting spell
- SetInFlightSpell spell
- FrameScript_SignalEvent ui
Calls and jumps by a bare address, from tables/calls.tsv.