Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 09-02-12, 05:25 PM   #1
Irongunner
A Deviate Faerie Dragon
Join Date: Mar 2011
Posts: 11
Problem with castbar icon in PostCastStart

Hey guys,

I am using parts of oUF_Hank in my own oUF layout. My castbar is based on the one in his addon. It has some nice fading animations based on whether the cast succeeded or not. To achieve this, a second 'dummy' castbar is used for playing the animation. In the PostCastStart function the texture of the spell icon, currently used in the 'real' castbar needs to be set in the 'dummy' castbar, so that the icon can be shown during the fade animation.

Here is the interesting part of the code from oUF_Hank:

Lua Code:
  1. oUF_Hank.PostCastStart = function(castbar, unit, name, rank, castid)
  2.     ...
  3.     castbar.Dummy.Icon:SetTexture(castbar.Icon:GetTexture())
  4.     ...

Unfortunately the GetTexture() call sometimes returns nil, so that the fading animation shows an icon from a previous cast. Is there a way to get the texture 100% of the time?

Bests
Iron
Irongunner is offline   Reply With Quote
 

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Problem with castbar icon in PostCastStart

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