1
0
EQ2Emu/docs/lua_functions/GetHateList.md
2025-05-13 22:57:49 -04:00

16 lines
582 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Function: GetHateList(NPC)
Description: Returns a list of all spawns currently on the specified NPCs hate (aggro) list. This includes anyone who has attacked or otherwise generated hate on the NPC.
Parameters:
NPC: Spawn The NPC whose hate list to retrieve.
Returns: Table A list/array of spawns that the NPC currently hates, typically sorted by hate amount (highest first).
Example:
-- Example usage (apply an effect to all players an epic boss has aggro on)
for _, enemy in ipairs(GetHateList(EpicBoss)) do
CastSpell(EpicBoss, AOE_DEBUFF_ID, 1, enemy)
end