Lua functions

SendNewTradeskillSpells

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

Historical signature: SendNewTradeskillSpells(player)

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

Function: SendNewTradeskillSpells(player)

Description: Grants missing tradeskill-class spells eligible for the Player's current tradeskill level. Checks the profession, its secondary class, and Artisan, skipping duplicate categories and spells already known. Eligible definitions use the tradeskill-class grant policy and tier 1. NPC-only definitions and definitions without a Lua script are skipped. Existing spellbook admission rules, including AA restrictions, still apply.

Parameters:

  • player (Spawn) - Player whose tradeskill spellbook should be refreshed. Other Spawn types are ignored.

Returns: None.

Ownership and delivery: The call retains the original Player and the eligible spell definitions. It uses the tradeskill level rather than the adventure level. Backend grants can proceed for an offline Player. A connection replacement during callbacks cannot grant spells to the replacement Player. Gained-spell messages, spellbook refresh, and slot mappings require the captured connection, session, packet context, and progression revision to remain current. A newer progression mutation stops the older grant operation. Each later Lua call observes its own current connection.

This function neither changes level nor awards XP. An exception can leave a partial grant; it does not provide a durable completion or retry guarantee and does not extend unrelated Lua userdata lifetimes.

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.