1
0
EQ2Emu/docs/lua_functions/GetHateList.md

19 lines
646 B
Markdown
Raw Permalink 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(spawn)
**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:**
- `spawn` (Spawn) - Spawn object representing `spawn`.
**Returns:** Table A list/array of spawns that the NPC currently hates.
**Example:**
```lua
-- Example usage (apply an effect to all players an epic boss has aggro on)
for _, enemy in ipairs(GetHateList(EpicBoss)) do
CastSpell(enemy, AOE_DEBUFF_ID, 1, EpicBoss) -- this assumes the AOE_DEBUFF_ID has no cast time so the mob can instantly cast
end
```