Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitAffectingCombat

Last wiki revision 2023-08-13

Returns true if the unit is in combat. affectingCombat = UnitAffectingCombat(unit)

  • unit: : UnitId - The unit to check.
  • affectingCombat: - Returns true if the unit is in combat or has aggro, false otherwise.
  • Returns true when initiating combat.
  • Returns true if aggroed, even if enemy doesn't land a blow.
  • For hunters, it returns true shortly after pet enters combat.
  • If using timed spell such as aimed shot, returns true when spell fires (not during charge up).
  • Returns to false on death.
  • Returns false if the unit being checked for aggro is out of range, or in another zone.
  • Returns false if a unit is proximity-aggroed. It wont return true until it either attacks or is attacked.

Source

https://warcraft.wiki.gg/wiki/API_UnitAffectingCombat · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.