Historical signature: GetMostHated(NPC)
Parameter and behavior details in the historical explanation are under review against the current implementation.
Function: GetMostHated(NPC)
Description:
Retrieves the spawn that currently has the highest hate (aggro) on the specified NPC’s hate list. This is usually the NPC’s current primary target in combat.
Parameters:
spawn (Spawn) - Spawn object representing spawn.
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.
local hated = GetMostHated(NPC)
Evidence: server/SpawnScripts/DrayeksChamber/KingDrayek.lua:66; binding EQ2Emu_lua_GetMostHated.
Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.