WoW:API UnitAffectingCombat

From AddOn Studio
Revision as of 06:15, 5 April 2005 by WoWWiki>Flickering
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
UnitAffectingCombat -Documentation by Flickering-

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

Returns
affectingCombat
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.

Template:WoW API