Lua functions

CancelSpell

Registered in this checkout as EQ2Emu_lua_CancelSpell; implementation found at WorldServer/Lua/LuaFunctions.cpp:10623.

Historical signature: CancelSpell(…) via current binding

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: CancelSpell()

Description: Queues cancellation of the current spell. Requires execution in a spell script with an available caster and zone. If either cannot be acquired, no cancellation is queued. Cancellation is processed by the spell's originally bound processor rather than immediately destroying the spell inside this native call. A closed or expired original processor accepts no new request.

Parameters: None.

Returns: None.

Spell caster lifetime: When this function reads a spell's caster, it retains that allocation for the native operation. Retirement or callback reentry cannot replace its caster with a different allocation at the same address or runtime ID. A known expired or cleared caster is not rediscovered through a replacement connection. An actor already owned by the active callback remains usable through that callback. See Lua actor lifetime.

Checked example

Active call in a local runtime Lua script. Uses the current spell context. This is a contextual call pattern, not a tested standalone script.

CancelSpell()

Evidence: server/Spells/AtrebasEtherealBindings.lua:27; binding EQ2Emu_lua_CancelSpell.

Current registration: WorldServer/Lua/LuaInterface.cpp.