Lua functions

GetGender

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

Historical signature: GetGender(spawn)

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

Function: GetGender(spawn)

Description: Gets the gender of the current spawn. 0 = Female, 1 = Male

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: None.

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.

gender = GetGender(NPC)

Evidence: server/SpawnScripts/Generic/GenericEcologyVoiceOvers.lua:83; binding EQ2Emu_lua_GetGender.

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