View Single Post
03-11-22, 05:00 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
There is unfortunately no "one size fits all" answer.

If you wanted to piggyback on Blizzard's definition of reactive abilities you could potentially
1. Create a frame and Register for the COMBAT_TEXT_UPDATE event.
2. Use CombatTextSetActiveUnit("player") to set the unit to monitor to yourself.
3. Check for combattextType equals "SPELL_ACTIVE" in your event handler.
4. Get the ability with
Code:
local ability = GetCurrentCombatTextEventInfo()
If you want to be in control of what counts as reactive you'd have to do that on a case by case basis.
Does it give a buff? Check buffs.
Does it always happen after a crit/avoid/other combat event? Parse combatlog.
Etc.

An addon that tries something similar for the Classic client whose code might be easier to follow is ClassicSpellActivations.
Source code on github

Last edited by Dridzt : 03-11-22 at 05:03 AM.
  Reply With Quote