API:UnitCanAttack

__NOTOC__
Determines if a unit can be attacked by another unit
canAttack = UnitCanAttack(attacker, attackTarget)
== Parameters ==
=== Arguments ===
:;attacker
::UnitId - the unit who is attacking
:;attackTarget
::UnitId - the unit who will possibly be attacked
=== Returns ===
:;canAttack
::Boolean value. true if attack is possible, false otherwise
== Example ==
if ( UnitCanAttack("player", "target") ) then
 SendChatMessage("Start running " .. UnitName("target") .. " 'cause you're about to DIE!", "SAY" )
end
UnitCanAttack