Lua functions

GetInfoStructUInt

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

Historical signature: GetInfoStructUInt(spawn, field)

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

Function: GetInfoStructUInt(spawn, field)

Description: Retrieves an unsigned integer field from a spawn’s info struct. This can include things like level, model type, gender, etc. 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: Int32 – The value of the 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 currentXP = GetInfoStructUInt(Player, "xp")

Evidence: server/PlayerScripts/global.lua:106; binding EQ2Emu_lua_GetInfoStructUInt.

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