Lua functions

HasControlEffect

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

Historical signature: HasControlEffect(spawn, type)

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

Function: HasControlEffect(spawn, type)

Description: Identifies if the Spawn has the control effect type defined. The Control Effect Type list can be found at https://github.com/emagi/eq2emu/blob/main/docs/data_types/control_effect_types.md

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • type (int32) - Integer value type.

Returns: True if the Spawn has the control effect type specified, 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 not HasControlEffect(Target, 4) then

Evidence: server/Spells/ClassicRefresh/Fighter/Brawler/Bruiser/BarbarousStomp-2550841.lua:19; binding EQ2Emu_lua_HasControlEffect.

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