Lua functions

ModifyMaxPower

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

Historical signature: ModifyMaxPower(spawn, value)

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

Function: ModifyMaxPower(spawn, value)

Description: Sets the Maximum Power of the Spawn to the value provided.

Parameters:

  • spawn (Spawn) - Spawn object representing 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.

ModifyMaxPower(NPC, math.floor(pw))

Evidence: server/SpawnScripts/Generic/NPCModule.lua:354; binding EQ2Emu_lua_ModifyMaxPower.

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