Lua functions

RemoveRecipeFromPlayer

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

Historical signature: RemoveRecipeFromPlayer(player, recipe_id)

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

Function: RemoveRecipeFromPlayer(player, recipe_id)

Description: Removes an individual recipe from the Player's learned recipe list and submits its database deletion. The containing recipe-book registration is a separate record.

Parameters:

  • player (Spawn) - Player whose learned recipe should be removed.
  • recipe_id (uint32) - Recipe ID to select for removal.

Returns: Boolean. true when the selected original entry is removed from the Player's in-memory list; false for an invalid Player, unavailable/currently replaced connection, missing recipe, or an entry removed/replaced before its removal commits. The result does not confirm a database commit.

Ownership and callbacks: The call retains the original Player before releasing its Lua argument stack and binds the native helper to that Player and connection/session. A replacement between lookup and admission rejects the request. Once selected, the recipe allocation remains owned through formatting and callbacks. Removal checks the exact original allocation: a newer recipe with the same ID cannot be removed by the older pending operation. Remaining readers keep their original recipe alive after removal. UI delivery uses the original audience.

Checked example

No checked example is published for this function yet. No active script call with the current C++ argument count was found.

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