Thread Tools Display Modes
10-21-10, 05:04 PM   #21
Ereki
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 25
I have looked through it but I can't say it helped that much but I now I pretty much took their code and used it for my purpose so this is what I have now:
Code:
elseif event == "RUNE_POWER_UPDATE" and InCombatLockdown() and not UnitInVehicleControlSeat("player") then
	local runeIndex, isEnergize = ...;
	local runeButton = _G["RuneButtonIndividual"..runeIndex];
	local start, duration, runeReady = GetRuneCooldown(runeIndex);
			
	if not runeReady and not isEnergized then
		if start then
			runeButton:SetAlpha(RHaoc)
		end
	else
		runeButton:SetAlpha(RHaic)
	end

	if isEnergize then
		runeButton:SetAlpha(RHaic)
	end
and this is the blizzard code:
Code:
local runeIndex, isEnergize = ...;
if runeIndex and runeIndex >= 1 and runeIndex <= MAX_RUNES  then 
	local runeButton = _G["RuneButtonIndividual"..runeIndex];
	local cooldown = _G[runeButton:GetName().."Cooldown"];
	
	local start, duration, runeReady = GetRuneCooldown(runeIndex);
	
	if not runeReady  then
		if start then
			CooldownFrame_SetTimer(cooldown, start, duration, 1);
		end
		runeButton.energize:Stop();
	else
		cooldown:Hide();
		runeButton.shine:SetVertexColor(1, 1, 1);
		RuneButton_ShineFadeIn(runeButton.shine)
	end
		
	if isEnergize  then
		runeButton.energize:Play();
	end
else 
	assert(false, "Bad rune index")
end
And I'm still getting the same results as before...
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Using a value in a frame name

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