Thread Tools Display Modes
03-17-14, 05:30 PM   #1
Mirrikh
A Flamescale Wyrmkin
 
Mirrikh's Avatar
AddOn Compiler - Click to view compilations
Join Date: Sep 2011
Posts: 111
Raid Buffs using Weak Auras

As the title says, i'm trying to set up some weak auras to show that i have all my raid buffs, but i can't quite figure out how to get them to work since the buffs can change depending what you bring in the raid.
  Reply With Quote
03-17-14, 06:44 PM   #2
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
GetRaidBuffTrayAuraInfo() would probably be quite useful.
  Reply With Quote
03-18-14, 01:17 PM   #3
Mirrikh
A Flamescale Wyrmkin
 
Mirrikh's Avatar
AddOn Compiler - Click to view compilations
Join Date: Sep 2011
Posts: 111
not too good at lua, could you show me how the code should go?
  Reply With Quote
03-19-14, 05:26 AM   #4
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
If you could post whatever you have at the moment it'd help.

I don't use WeakAuras myself but I am aware of the principles behind it so these may or may not work. For each of the following set the trigger as an 'aura' or 'buff' (I'm not aware of WeakAura's terminology) on the player.

For a single aura that'll activate if you're not missing any raid buffs:
Lua Code:
  1. -- If you want it to activate if you're missing any buff types swap the 'true' and 'false'.
  2. function()
  3.     for i=1, NUM_LE_RAID_BUFF_TYPES do
  4.         if not (GetRaidBuffTrayAuraInfo(i)) then
  5.             return false
  6.         end
  7.     end
  8.     return true
  9. end

For an aura that activates if you're missing a specific raid buff type:
Lua Code:
  1. --[[
  2. Each number corresponds to a specific raid buff type.
  3. 1 - Stats
  4. 2 - Stamina
  5. 3 - Attack Power
  6. 4 - Attack Speed
  7. 5 - Spell Power
  8. 6 - Spell Haste
  9. 7 - Critical Strike
  10. 8 - Mastery
  11. ]]--
  12.  
  13. function()
  14.     -- Replace the '#' with a number from above for the matching buff type.
  15.     -- If you want it to activate if you're missing the buff type swap the 'true' and 'false'.
  16.     return (GetRaidBuffTrayAuraInfo(#)) and true or false
  17. end
  Reply With Quote
03-19-14, 01:12 PM   #5
Mirrikh
A Flamescale Wyrmkin
 
Mirrikh's Avatar
AddOn Compiler - Click to view compilations
Join Date: Sep 2011
Posts: 111
Thank you so much, this has been super helpful. What i had before was...i'm not even sure haha.
  Reply With Quote
03-19-14, 02:05 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Oppugno View Post
For a single aura that'll activate if you're not missing any raid buffs:
That will work, but won't take into account whether or not anyone in your raid can actually provide the buffs that are missing.

Here's a revised version that should ignore unavailable buffs:

Lua Code:
  1. -- If you want it to activate if you're missing any buff types swap the 'true' and 'false'.
  2. function()
  3.     local buffMask, maxBuffs = GetRaidBuffInfo()
  4.     if buffMask then
  5.         local numBuffs = 0
  6.         for i = 1, NUM_LE_RAID_BUFF_TYPES do
  7.             if GetRaidBuffTrayAuraInfo(i) then
  8.                 numBuffs = numBuffs + 1
  9.             end
  10.         end
  11.         if numBuffs < maxBuffs then
  12.             return false
  13.         end
  14.     end
  15.     return true
  16. end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-19-14, 10:04 PM   #7
Mirrikh
A Flamescale Wyrmkin
 
Mirrikh's Avatar
AddOn Compiler - Click to view compilations
Join Date: Sep 2011
Posts: 111
thanks phanx, exactly how would i set this up? make a icon and give it a custom trigger with that code popped in?

Last edited by Mirrikh : 03-20-14 at 01:52 AM.
  Reply With Quote
03-20-14, 12:54 AM   #8
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
Originally Posted by Phanx View Post
That will work, but won't take into account whether or not anyone in your raid can actually provide the buffs that are missing.
That's a very good point.

Here's the single buff version:
Lua Code:
  1. --[[
  2. Each number corresponds to a specific raid buff type.
  3. 1 - Stats
  4. 2 - Stamina
  5. 3 - Attack Power
  6. 4 - Attack Speed
  7. 5 - Spell Power
  8. 6 - Spell Haste
  9. 7 - Critical Strike
  10. 8 - Mastery
  11. ]]--
  12.  
  13. function()
  14.     -- Replace the '#'s with a number from above for the matching buff type.
  15.     if bit.band(GetRaidBuffInfo(), 2^(#-1)) > 0 then
  16.         -- If you want it to activate if you're missing the buff type swap this 'true' and 'false'.
  17.         return (GetRaidBuffTrayAuraInfo(#)) and true or false
  18.     else
  19.         return false
  20.     end
  21. end

Although, it seems GetRaidBuffInfo() only returns useful information when in a group. So if you're looking to use these revised ones when solo they won't trigger.

Last edited by Oppugno : 03-20-14 at 01:03 AM.
  Reply With Quote
03-20-14, 02:54 PM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Mirrikh View Post
thanks phanx, exactly how would i set this up? make a icon and give it a custom trigger with that code popped in?
I've never actually used WeakAuras either, but I'd assume that's how it works.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-21-14, 11:45 AM   #10
Alltherage
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1
Long winded method

Probably a long winded method of doing things, but I have a string for my own WeakAura raid buff tracker here:

http://www.tekagi.com/?page_id=56

It displays icons for the raid buffs you are missing, including food and flasks. It doesn't however, check if those buffs are available from your raid - but then I do find that knowing what my group is missing helpful too.
  Reply With Quote
03-21-14, 09:22 PM   #11
Mirrikh
A Flamescale Wyrmkin
 
Mirrikh's Avatar
AddOn Compiler - Click to view compilations
Join Date: Sep 2011
Posts: 111
thx alltherage, i wanted to do this after seeing your buff setup from your ui.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Raid Buffs using Weak Auras


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off