Lua functions

GetInfoStructSInt

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

Historical signature: GetInfoStructSInt(spawn, field)

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

Function: GetInfoStructSInt(spawn, field)

Description: Gets a signed integer field from the spawn’s info struct. Similar to GetInfoStructUInt but for fields that can be negative. See https://github.com/emagi/eq2emu/blob/main/docs/data_types/info_struct.md for a full list of options.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • field (string) - String field.

Returns: SInt32 – The value of that field.

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.

CurrentRegen = GetInfoStructSInt(Caster, "hp_regen")

Evidence: server/Spells/BattleRest.lua:10; binding EQ2Emu_lua_GetInfoStructSInt.

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