View Single Post
07-11-09, 01:57 PM   #4
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
THe problem is that when you call SetAttribute() the value on the left is the attribute that you're setting (the name or lValue) and the value on the right is what you are setting it to ( the value, or rValue). So...

ExecuteWarning_Pet_BuffFrame:SetAttribute('spell', "Health Funnel")

is setting the value of "spell" to "Health Funnel" in the same way that

spell = "Health Funnel"

would work.

So, when you then call

ExecuteWarning_Pet_BuffFrame:SetAttribute('spell', "Life Tap")

you are *changing* spell = "Health Funnel" to spell = "Life Tap"

In order for what you want to work to work, you have to have "type1" and "type2" reference two different spells... and I can't recall the mechanism to do that off hand.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/