Thread Tools Display Modes
04-21-11, 01:13 PM   #1
Dura
A Murloc Raider
Join Date: Apr 2011
Posts: 6
How to hide friendly castbar ?

I think oUF looks pretty sweet, so I got it, and I set it LUI oUF castbars up to my liking, however, I can't figure out how to hide the target castbar if the target is friendly.

Last edited by Dura : 04-21-11 at 01:18 PM.
  Reply With Quote
04-22-11, 07:31 AM   #2
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 56
Originally Posted by Dura View Post
I think oUF looks pretty sweet, so I got it, and I set it LUI oUF castbars up to my liking, however, I can't figure out how to hide the target castbar if the target is friendly.
Replace the targetframe's Show() function with one that checks to see if the target is your friend or enemy? Might work!

lua Code:
  1. if self.unit == "target" then
  2.     self.Castbar.BlizzShow = self.Castbar.Show
  3.     self.Castbar.Show = function(self)
  4.         if UnitIsEnemy("player", "target") then
  5.             self:BlizzShow()
  6.         else
  7.             self:Hide()
  8.         end
  9.     end
  10. end
  Reply With Quote
04-22-11, 02:00 PM   #3
Dura
A Murloc Raider
Join Date: Apr 2011
Posts: 6
Thanks for writing up the code for me mate.

There's a slight problem though, I have no idea where to insert the code within the interface file.
I go to Interface > Addons > and the oUF core or the oUF layout? And where do I go from there?
I'm using the oUF LUI layout btw.

Last edited by Dura : 04-23-11 at 06:28 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » How to hide friendly castbar ?


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