WoW:API UnitAffectingCombat: Difference between revisions
Jump to navigation
Jump to search
UnitAffectingCombat -Documentation by Flickering-
m (Cleaned up a bit) |
m (sp) |
||
Line 24: | Line 24: | ||
:If using timed spell such as aimed shot, goes true when spell fires (not during charge up). | :If using timed spell such as aimed shot, goes true when spell fires (not during charge up). | ||
:Goes to false on death. | :Goes to false on death. | ||
:Is false if the unit being checked for | :Is false if the unit being checked for aggro is out of range, or in another zone. | ||
''Note: remains false if a unit is proximity-aggroed. It wont go true until it either attacks or is attacked.'' | ''Note: remains false if a unit is proximity-aggroed. It wont go true until it either attacks or is attacked.'' | ||
---- | ---- |
Revision as of 05:59, 19 August 2007
← WoW API < UnitAffectingCombat
Determine whether a unit is in combat or has aggro.
affectingCombat = UnitAffectingCombat("unit");
Parameters
Arguments
- ("unit")
- unit
- String - The UnitId of the unit to check (Tested with "player", "pet", "party1", hostile "target")
Returns
- affectingCombat
- Flag - Returns 1 if the unit is in combat or has aggro, nil otherwise.
Details
- Goes true when initiating combat.
- Goes true if aggroed, even if enemy doesn't land a blow.
- If a hunter, then goes true shortly after pet enters combat.
- If using timed spell such as aimed shot, goes true when spell fires (not during charge up).
- Goes to false on death.
- Is false if the unit being checked for aggro is out of range, or in another zone.
Note: remains false if a unit is proximity-aggroed. It wont go true until it either attacks or is attacked.