Lua functions

SetMaxHP

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

Historical signature: SetMaxHP(spawn, value)

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

Function: SetMaxHP(spawn, value)

Description: Set's the Max HP of the Spawn (As a Spell Bonus) to the new value.

Parameters:

  • spawn (Spawn) - Spawn object reference spawn.
  • value (int32) - Integer value value.

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.

SetMaxHP(Pet, hp)

Evidence: server/SpawnScripts/Generic/PetModule.lua:242; binding EQ2Emu_lua_SetMaxHP.

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