Lua functions

GetCharacterID

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

Historical signature: GetCharacterID(spawn)

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

Function: GetCharacterID(spawn)

Description: Gets the character id of the current Spawn(Player).

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: UINT32 value of Spawn's the character id. 0 if not a Player.

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.

if GetCharacterID(Spawn) == charid then

Evidence: server/SpawnScripts/Generic/SpiritShard.lua:24; binding EQ2Emu_lua_GetCharacterID.

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