Lua functions

ModifyPower

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

Historical signature: ModifyPower(spawn, value)

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

Function: ModifyPower(spawn, value)

Description: Sets the Spawn's Power to the value if the value plus the current power is greater than the Spawn's Total Power. If the current power plus the is less than the total power, then it will restore the current power up to the value.

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.

ModifyPower(Pet, pw)

Evidence: server/SpawnScripts/Generic/PetModule.lua:245; binding EQ2Emu_lua_ModifyPower.

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