View Single Post
02/12/21, 12:17 PM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
I think he wanted to know if the critter is alive, not the player.
As there is no uniqueId for the critter and nothing after fight you could just check during fight what unitTags exist and also check if a unitTag gets destroyed -> should be the case as it will be killed.
EVENT_UNIT_DESTROYED (*string* _unitTag_)
-> Maybe not working for NPCs and critters, just group members and bosses .

* IsUnitDead(*string* _unitTag_)
** _Returns:_ *bool* _isDead_
GetUnitPower(CombatMechanicType)
+ the other GetUnit* and IsUnit* functions from the API txt documentation.

Maybe these only work with the unitTags you get from events and/or the "reticleover" where you need to move the crosshair above an enemy.

If these unitTags are not working for critters you might only be able to use events where there are _sourceUnitId_and _targetUnitId_ to identify the involved combatants.
  Reply With Quote