Lua functions

GetPlayerHistory

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

Historical signature: GetPlayerHistory(Player, HistoryID)

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

Function: GetPlayerHistory(Player, HistoryID)

Description: Returns both values recorded for one player history event. The two results come from one copied history snapshot, so a later update cannot mix values from different revisions.

Parameters:

  • Player (Spawn) โ€” Player whose history is read.
  • HistoryID (uint32) โ€” Event ID used with SetPlayerHistory.

Returns: Two uint32 integers (value, value2) when the event exists. Stored zero values are returned as zero. A missing event or invalid player returns no Lua results; assigning the results then yields nil.

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 value1, value2 = GetPlayerHistory(Dialog.Player, v.Value1)

Evidence: server/SpawnScripts/Generic/DialogModule.lua:90; binding EQ2Emu_lua_GetPlayerHistory.

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