Lua functions

SetCharacterTitleSuffix

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

Historical signature: SetCharacterTitleSuffix(spawn, titleName)

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

Function: SetCharacterTitleSuffix(Spawn, TitleName)

Description: Selects an owned suffix title by name for the original Player.

Parameters:

  • Spawn: Spawn - The Player whose title is being selected.
  • TitleName: string - Owned suffix title name, matched without case sensitivity.

Returns: None. The native function does not push a Lua result.

Behavior and ownership: An invalid Player, missing title or title of the wrong type leaves the selection unchanged and logs an error. The function copies the owned title entry and saves its zero-based character index. Row lookup does not expose a title pointer after releasing the list lock.

The original Player and connection are captured before persistence callbacks. UI generation uses copied title snapshots, and delivery stops if that connection's Player relationship or session generation changes. A later Lua call observes the current connection. The selected title's metadata stays owned throughout this operation.

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.