Lua functions

IsInCombat

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

Historical signature: IsInCombat(spawn)

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

Function: IsInCombat(spawn)

Description:

Return's true if the spawn is currently in combat.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: Return's true if the spawn is currently in combat.

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 IsInCombat(NPC) then

Evidence: server/SpawnScripts/Generic/ExpelNonCitizen.lua:110; binding EQ2Emu_lua_IsInCombat.

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