Lua functions

GetPCTOfPower

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

Historical signature: GetPCTOfPower(spawn, pct)

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

Function: GetPCTOfPower(spawn, pct)

Description: Get the Spawn's amount of power in UInt32 value using a float percentage.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • pct (float) - float value pct.

Returns: UInt32 representation of the power against the percentage provided 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.

SpellHeal("Power", GetPCTOfPower(Caster, PwrAmt))

Evidence: server/Spells/Commoner/FerventQuickening.lua:11; binding EQ2Emu_lua_GetPCTOfPower.

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