View Single Post
10-15-10, 12:50 PM   #18
Ereki
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 25
Tried that and I got the same bug as when I tried to use just _G["RuneButtonIndividual"..i] for setting the alpha when they go on cooldown which is it only fades the first rune I use and then ignores the rest and it doesn't turn the alpha up for the rune it faded once it's ready again either. When I changed it to:
Code:
local runeIndex, isEnergize = ...
			
if isEnergize == true then
	G["RuneButtonIndividual"..runeIndex]:SetAlpha(RHaic)
	lastAlpha = runeIndex
	lastUpdate = GetTime()
else 
	if lastUpdate and lastUpdate + 2 < GetTime() then lastAlpha = false end
	if lastAlpha == nil then lastAlpha = false end

	if GetRuneCooldown(1) > 0 and lastAlpha ~= 1 then
		RuneButtonIndividual1:SetAlpha(RHaoc) else 
		RuneButtonIndividual1:SetAlpha(RHaic)
	end
	if GetRuneCooldown(2) > 0 and lastAlpha ~= 2 then
		RuneButtonIndividual2:SetAlpha(RHaoc) else 
		RuneButtonIndividual2:SetAlpha(RHaic)
	end
	if GetRuneCooldown(3) > 0 and lastAlpha ~= 3 then
		RuneButtonIndividual3:SetAlpha(RHaoc) else 
		RuneButtonIndividual3:SetAlpha(RHaic)
	end
	if GetRuneCooldown(4) > 0 and runeIndex ~= 4 then
		RuneButtonIndividual4:SetAlpha(RHaoc) else 
		RuneButtonIndividual4:SetAlpha(RHaic)
	end
	if GetRuneCooldown(5) > 0 and lastAlpha ~= 5 then
		RuneButtonIndividual5:SetAlpha(RHaoc) else 
		RuneButtonIndividual5:SetAlpha(RHaic)
	end
	if GetRuneCooldown(6) > 0 and lastAlpha ~= 6 then
		RuneButtonIndividual6:SetAlpha(RHaoc) else 
		RuneButtonIndividual6:SetAlpha(RHaic)
	end
end
I got the exact same results as I've had every time before :p
  Reply With Quote