Historical signature: ClearEncounter(…) via current binding
Parameter and behavior details in the historical explanation are under review against the current implementation.
Function: ClearEncounter(spawn)
Description:
Clears the NPC brain's old encounter members, player membership index and player-in-encounter flag, then removes its spells outside the encounter lock. Members added by a spell-removal callback remain in the new encounter.
Parameters:
spawn (NPC userdata) - NPC whose admitted brain receives the operation.
Returns: None. Invalid arguments are logged; an unavailable brain receives no mutation.
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.
ClearEncounter(NPC)
Evidence: server/SpawnScripts/BrawlersDojo/afirstcircleadept.lua:52; binding EQ2Emu_lua_ClearEncounter.
Current registration: WorldServer/Lua/LuaInterface.cpp.