WoW:API UnitAffectingCombat: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API UnitAffectingCombat to API UnitAffectingCombat without leaving a redirect) |
||
(7 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Determine whether a unit is in combat or has aggro. | Determine whether a unit is in combat or has aggro. | ||
Line 12: | Line 13: | ||
=== Returns === | === Returns === | ||
;affectingCombat : Flag - Returns true if the unit is in combat or has aggro, false otherwise. | |||
==Details== | ==Details== | ||
: | :Returns true when initiating combat. | ||
: | :Returns true if aggroed, even if enemy doesn't land a blow. | ||
:If a hunter, then | :If a hunter, then returns true shortly after pet enters combat. | ||
:If using timed spell such as aimed shot, | :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. | |||
''Note: returns false if a unit is proximity-aggroed. It wont return true until it either attacks or is attacked.'' | |||
---- | ---- | ||
Latest revision as of 04:47, 15 August 2023
← WoW API < UnitAffectingCombat
Determine whether a unit is in combat or has aggro.
affectingCombat = UnitAffectingCombat("unit");
Parameters[edit]
Arguments[edit]
- ("unit")
- unit
- String - The UnitId of the unit to check (Tested with "player", "pet", "party1", hostile "target")
Returns[edit]
- affectingCombat
- Flag - Returns true if the unit is in combat or has aggro, false otherwise.
Details[edit]
- Returns true when initiating combat.
- Returns true if aggroed, even if enemy doesn't land a blow.
- If a hunter, then 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.
Note: returns false if a unit is proximity-aggroed. It wont return true until it either attacks or is attacked.