Lua functions

RemoveSpellBookEntry

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

Historical signature: RemoveSpellBookEntry(player, spellid)

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

Function: RemoveSpellBookEntry(player, spellid)

Description:

Removes matching entries from a connected Player's runtime spell book. Passive entries also run their existing passive-effect cleanup. Generic removal preserves the engine's AA rank protections; AA changes use the validated AA rank service.

Parameters:

  • player (Spawn) - A valid Player with an available connection.
  • spellid (uint32) - The spell ID to remove.

Returns: None.

Behavior:

An absent entry, invalid/non-Player Spawn or unavailable connection leaves the book unchanged. Selection reads an owned row copy. Removal consumes the original matching book rows before passive callbacks; a replacement admitted by a callback is not part of that old removal batch. The function retains its resolved connection through the native call and requests the existing book/mapping notifications. This does not promise an immediate database save of every ordinary spell removal.

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.

RemoveSpellBookEntry(Player, 2550401)

Evidence: server/ItemScripts/BrawlerCertificationPapers.lua:42; binding EQ2Emu_lua_RemoveSpellBookEntry.

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