Lua functions

GetInfoStructFloat

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

Historical signature: GetInfoStructFloat(spawn, field)

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

Function: GetInfoStructFloat(spawn, field)

Description: Retrieves a floating-point field from a spawn’s info data. Could be used for precise position, speed multipliers, etc. if stored there. 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: Float – 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.

local str = GetInfoStructFloat(Target, "str")

Evidence: server/Spells/Commoner/RevivedSickness.lua:26; binding EQ2Emu_lua_GetInfoStructFloat.

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