Thread Tools Display Modes
04-06-09, 06:46 AM   #1
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
oUF_HolyPaladin

Does something like this exist to show the duration of sacred shield/beacon of light easily?
  Reply With Quote
04-06-09, 08:22 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by mrruben5 View Post
Does something like this exist to show the duration of sacred shield/beacon of light easily?
In my opinion this has nothing to do specifically to oUF, but you could write a tag or make a buff display with the new filter function in the 'consistency' branch of oUF found on haste's git.
  Reply With Quote
04-18-09, 11:45 AM   #3
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Alright, managed to write something like this:
Code:
oUF.Tags["[sacredshield]"] = function(u)
    local i, string = 1, ""
    -- name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"]) 
    local name, _, _, _, _, _, _, fromwho = UnitAura(u, i)
    while name do
        if name == "Sacred Shield" then
            if fromwho == "player" then
                string = string .. "|cffFFFF00.|r"
            else
                string = string .. "|cffCCCC00.|r"
            end
        end
        i = i + 1;
        name, _, _, _, _, _, _, fromwho = UnitAura(u, i)
    end
    return string
end
oUF.TagEvents["[sacredshield]"] = "UNIT_AURA"
I want to see when other paladins in my raid have buffed someone with sacred shield, now for my question: is this the effecient way to do it, or should I do it another way?

In what way will UnitAura handle multiple buffs with the same name?

PS: writing this for use with oUF_Freebgrid
  Reply With Quote
04-18-09, 03:51 PM   #4
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
This is a bit simpler and still does what you want I think.

Code:
oUF.Tags["[sacredshield]"] = function(u)
 local name, _,_,_,_,_,_, fromwho,_ = UnitAura(u, "Sacred Shield")
 if (fromwho == "player") then
   return UnitAura(u, "Sacred Shield") and "|cffFFFF00.|r" or ""
 else
   return UnitAura(u, "Sacred Shield") and "|cffCCCC00.|r" or ""
end
oUF.TagEvents["[rnw]"] = "UNIT_AURA"
  Reply With Quote
04-19-09, 07:02 AM   #5
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
That's nice, but sacred shield is actually two buffs, one as the buff and one as the proc, after you get hit. I would like to see both. I also want to see if any other paladin has cast sacred shield on the unit in addition to me, so I know wether or not I should recast it any time.
  Reply With Quote
04-19-09, 07:19 AM   #6
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
The code freebaser gave you will clearly indicate if you casted the spell or not.
__________________
All I see is strobe lights blinding me in my hindsight.
  Reply With Quote
04-19-09, 07:59 AM   #7
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Wimpface View Post
The code freebaser gave you will clearly indicate if you casted the spell or not.
Originally Posted by mrruben5 View Post
...but sacred shield is actually two buffs, one as the buff and one as the proc, after you get hit. I would like to see both. I also want to see if any other paladin has cast sacred shield on the unit in addition to me...
Can you see where I am going?
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF_HolyPaladin


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