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.
|