Thread: castbar help
View Single Post
12-31-12, 09:52 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I'm not really sure if I understand your question. Do you want the players castbar to be shown on the raid unit you are healing?

If so: You can't really spawn a player castbar on a raid frame, but you can move the player castbar to the raid frame on OnEnter/Onleave.

Something like:
Lua Code:
  1. OnEnter = function(self)
  2.    -- Move the player castbar to the raid frame we are hovering.
  3.    local castbar = YourPlayerFrame.Castbar
  4.  
  5.    castbar:ClearAllPoints()
  6.    castbar:SetAllPoints(self.Health)
  7. end
  8.  
  9. OnLeave = function(self)
  10.    -- Move the player castbar back to player.
  11.    local castbar = YourPlayerFrame.Castbar
  12.  
  13.    castbar:ClearAllPoints()
  14.    castbar:SetAllPoints(YourPlayerFrame.Health)
  15. end

Remember that you also need to :SetScript() these handlers.
__________________
「貴方は1人じゃないよ」
  Reply With Quote