View Single Post
08-22-10, 06:22 PM   #19
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
I had a chance to look over 1.4. And please correct me if I'm wrong Haste (or someone else that know)

If all you want to do is show a frame (texture, text or whatever) then you can just define it as Castbar.Shield and it should show and hide automatically.

If you want to do something else, for example the code you posted sacrifice, then you will need to do the following.


Outside style function
Code:
local CastInterruptable = function(self, unit)
  -- Do your thing here
end
local CastNonInterruptable = function(self, unit)
  -- Do your thing here
end
local PostCastStart = function(self, unit, name, rank, castid)
  if self.interrupt then
    CastNonInterruptable(self, unit)
  else
    CastInterruptable(self, unit)
  end
end
Inside style function
Code:
Castbar.PostCastStart = PostCastStart 
Castbar.PostCastInterruptible = CastInterruptable
Castbar.PostCastNotInterruptible = CastNonInterruptable
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote