View Single Post
01-08-21, 05:19 PM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Take a look at https://wow.gamepedia.com/API_AuraUtil.FindAuraByName

Lua Code:
  1. local name = AuraUtil.FindAuraByName("Shadowcore Oil", 'player')
  2. if(name) then
  3. print("Buff found.")
  4. end

and

Lua Code:
  1. for i = 1, MAX_RAID_MEMBERS do
  2. local unit = format("%s%i", 'raid', i)
  3. end

Lua Code:
  1. local buffFound = 0
  2. for i = 1, MAX_RAID_MEMBERS do
  3.     local unit = format("%s%i", 'raid', i)
  4.     local name = AuraUtil.FindAuraByName("Shadowcore Oil", unit)
  5.     if(name) then
  6.         buffFound = buffFound + 1
  7.     end
  8. end
__________________
The cataclysm broke the world ... and the pandas could not fix it!

Last edited by Rilgamon : 01-08-21 at 05:24 PM.
  Reply With Quote