Lua functions

GetMaxHP

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

Historical signature: GetMaxHP(spawn)

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

Function: GetMaxHP(spawn)

Description: Gets the maximum (total) hp of the spawn.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: SInt32 of the max hp for the 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.

max_hp = GetMaxHP(NPC)

Evidence: server/SpawnScripts/Darklight/HarnenTaptha.lua:56; binding EQ2Emu_lua_GetMaxHP.

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