Lua functions

GetRaceType

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

Historical signature: GetRaceType(Spawn)

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

Function: GetRaceType(Spawn)

Description: Retrieves the race type category ID of the specified spawn. Instead of the specific race (human, elf, etc.), this returns a broader category (e.g., humanoid, animal, etc.).

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

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 GetRaceType(Target) == "Undead" then

Evidence: server/Spells/Priest/Cleric/Templar/DivineStrike.lua:12; binding EQ2Emu_lua_GetRaceType.

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