Lua functions

RemoveTriggerFromSpell

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

Historical signature: RemoveTriggerFromSpell(remove_count)

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

Function: RemoveTriggerFromSpell(remove_count)

Description: Remove a spell trigger from the spell, must be ran inside Spell Script.

Parameters:

  • remove_count (uint16) - Quantity remove_count.

Returns: None.

Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.

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. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

RemoveTriggerFromSpell(1)

Evidence: server/Spells/Commoner/BlightoftheMorning.lua:27; binding EQ2Emu_lua_RemoveTriggerFromSpell.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.