View Single Post
10-15-10, 06:58 AM   #11
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
oh i see, i was testing on a level 55 dk... ive never had one before xD

well instead of lastAlpha holding a time, make it hold a rune index

Code:
if isEnergize == true then
	_G["RuneButtonIndividual"..runeIndex]:SetAlpha(RHaic)
        lastAlpha = runeIndex
else then
                if lastAlpha == nil then lastAlpha = false end --if we dont have the variable defined yet, define it.
		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
                lastAlpha = false --clears it, so it doesnt hold the number when its not active by energization.
	end
that way if the cooldown is over 0 and it was just energized, then it keeps the alpha

also lastAlpha is being set to false... not nil

if lastAlpha is nil then lastAlpha == 1 will throw an error
if lastAlpha is false then lastAlpha == 1 will throw false
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote