Lua functions

GetFactionAmount

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

Historical signature: GetFactionAmount(player, faction_id)

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

Function: GetFactionAmount(player, faction_id)

Description: Gets the amount of faction value the player has with the specified faction_id.

Parameters:

  • player (Spawn) - Spawn reference object player.
  • faction_id (uint32) - Integer value faction_id.

Returns: SInt32 faction amount of the Player.

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 FP_MageFaction = GetFactionAmount(Spawn, 104)

Evidence: server/SpawnScripts/BeggarsCourt/CordiusSejanius.lua:113; binding EQ2Emu_lua_GetFactionAmount.

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