Thread Tools Display Modes
02-21-10, 01:30 PM   #1
r1pt1de
A Deviate Faerie Dragon
Premium Member
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 18
Buff Icon on a party members frame

I play a resto shaman and would like to add a buff icon to the party frame of the member I cast earth shield on. My goal is to be able to quickly identify whether or not earth shield is still present, and possibly the remaining charges. If this is possible, could you point me in the right direction?
  Reply With Quote
02-21-10, 02:18 PM   #2
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
I think you have two easy solutions :

1. Use a custom tag ala Freeb in oUF_Freebgrid
2. Use oUF_AuraWatch

Code:
--Shaman
49284, --Earth Shield
61301, --Riptide
52000, --Earthliving

elseif class == 'SHAMAN' then
	if i==11 then          
		icon:SetPoint('BOTTOMRIGHT',0,0)
		tex:SetVertexColor(140/255,95/255,75/255)
		local count = icon:CreateFontString(nil, 'OVERLAY')
		count:SetFont(db.font, db.fontsize-2, 'OUTLINE')
		count:SetPoint('CENTER', -6, 1)
		icon.count = count
	elseif i==12 then
		icon:SetPoint('TOPLEFT',0,0)
		tex:SetVertexColor(100/255,200/255,200/255)
	elseif i==13 then
		icon:SetPoint('BOTTOMLEFT',0,0)
		tex:SetVertexColor(100/255,200/255,140/255)
	end
Just change the i== with the correct number reference and you're done.
  Reply With Quote
02-22-10, 08:03 AM   #3
Taroven
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 49
Custom tags are the way to go, and fairly easy to do.

Code:
local myES = select(8,UnitBuff(unit,"Earth Shield")) == 'player'
You'll need to figure out how to use that in a tag. Event to watch is UNIT_AURA. If you need the number of stacks and not just whether or not the buff is there, it's about the same deal with a full list of UnitBuff returns.
__________________
Former author of EventHorizon Continued and Other Releases.
  Reply With Quote
02-22-10, 08:55 AM   #4
r1pt1de
A Deviate Faerie Dragon
Premium Member
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 18
Thank you both for your replies, gonna try and implement this myself. Searching for help on the tags now. Really new to LUA so not sure if im gonna be able to get it though hahaha. Would you two mind if I asked for more help later on if I cant figure this out?
  Reply With Quote
02-22-10, 09:34 AM   #5
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
No problem !

There's the tags I added when I used oUF_Freebgrid :

Code:
oUF.Tags['[rip]'] = function(u) 
	local name, _,_,_,_,_,_, fromwho,_ = UnitAura(u, 'Riptide')
	if not (fromwho == 'player') then return end
	if UnitAura(u, 'Riptide') then return '|cff00FEBFM|r' end end
oUF.TagEvents['[rip]'] = 'UNIT_AURA'

oUF.Tags['[ripTime]'] = function(u)
	local name, _,_,_,_,_, expirationTime, fromwho,_ = UnitAura(u, 'Riptide')
	if not (fromwho == 'player') then return end
	local spellTimer = '|cffffff00'..format('%.0f',-1*(GetTime()-expirationTime))..'|r'
	return spellTimer end
oUF.TagEvents['[ripTime]'] = 'UNIT_AURA'

oUF.earthCount = {'i','h','g','f','p','q','Z','Y'}
oUF.Tags['[earth]'] = function(u) local c = select(4, UnitAura(u, 'Earth Shield')) if c then return '|cffFFCF7F'..oUF.earthCount[c]..'|r' end end
oUF.TagEvents['[earth]'] = 'UNIT_AURA'
with the font you can found in oUF_Freebgrid, you can add a tag in your layout :

Code:
local myES = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
myES:SetFont(symbolfont, fontsize)    --  the symbol font
myES:SetShadowColor(0,0,0)
myES:SetShadowOffset(1.25,-1.25)
myES:SetPoint('CENTER', self.Health, 'BOTTOMRIGHT', 0, 0)
self:Tag(myES, '[earth]')
Do the same thing if you want the riptide and the riptime tags.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Buff Icon on a party members frame

Thread Tools
Display Modes

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