Lua functions

ClearHate

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

Historical signature: ClearHate(…) via current binding

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

Function: ClearHate(spawn, hated = nil)

Description: Clears an NPC's entire hate list, or only the given entity's hate entry.

Parameters:

  • spawn (NPC userdata) - NPC whose admitted brain receives the operation.
  • hated (Entity userdata, optional) - Player/NPC/entity to remove; omit it to clear all hate.

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.

ClearHate(NPC, Spawn)

Evidence: server/SpawnScripts/BrawlersDojo/afirstcircleadept.lua:49; binding EQ2Emu_lua_ClearHate.

Current registration: WorldServer/Lua/LuaInterface.cpp.