Lua functions

HasItemEquipped

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

Historical signature: HasItemEquipped(player, item_id)

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

Function: HasItemEquipped(player, item_id)

Description: Return's if the player has an item equipped with the item_id.

Parameters:

  • player (Spawn) - Spawn object representing player.
  • item_id (uint32) - Integer value item_id.

Returns: Return's true if the item_id is equipped on the player, otherwise false.

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.

if HasItemEquipped(Spawn, 157116) then

Evidence: server/ItemScripts/Griz.lua:22; binding EQ2Emu_lua_HasItemEquipped.

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